コード例 #1
0
 /**
  * Action listener for handle offline editing action. E.g "edit_doc_offline" action
  *
  * @param event ActionEvent
  */
 public void setupContentAction(ActionEvent event) {
   UIActionLink link = (UIActionLink) event.getComponent();
   Map<String, String> params = link.getParameterMap();
   String id = params.get("id");
   if (id != null && id.length() != 0) {
     super.setupContentDocument(id);
     checkoutFile(property.getDocument());
     if (userPreferencesBean.isDownloadAutomatically()) {
       FacesContext fc = FacesContext.getCurrentInstance();
       this.navigator.setupDispatchContext(property.getDocument());
       fc.getApplication()
           .getNavigationHandler()
           .handleNavigation(fc, null, "dialog:editOfflineDialog");
     } else {
       FacesContext fc = FacesContext.getCurrentInstance();
       fc.getApplication()
           .getNavigationHandler()
           .handleNavigation(fc, null, "dialog:close:browse");
     }
   } else {
     property.setDocument(null);
   }
   super.resetState();
 }
コード例 #2
0
 @Override
 public void init(Map<String, String> parameters) {
   super.init(parameters);
   continueCountdown = true;
 }
コード例 #3
0
 @Override
 public void restored() {
   super.restored();
   continueCountdown = false;
 }
コード例 #4
0
 @Override
 public String cancel() {
   super.cancel();
   return "dialog:close:browse";
 }