/** * 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(); }
@Override public void init(Map<String, String> parameters) { super.init(parameters); continueCountdown = true; }
@Override public void restored() { super.restored(); continueCountdown = false; }
@Override public String cancel() { super.cancel(); return "dialog:close:browse"; }