Пример #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();
 }