private void addButton(TreeNode parentNode, AppTopButtonVo value, boolean autoSelect) { if(parentNode != null && value != null && value.getAction() != null) { if(value.getAction().equals(TopButtonAction.BUILTIN)) { addPredefinedButton(parentNode, value, autoSelect); } else if(value.getAction().equals(TopButtonAction.FORM)) { addForm(parentNode, value, autoSelect); } else if(value.getAction().equals(TopButtonAction.URL)) { addUrl(parentNode, value, autoSelect); } } }
private boolean canRenameSelectedItem() { if(form.getMode() == FormMode.VIEW) return false; if(!isItemSelected()) return false; Object value = form.treItems().getSelectedNode().getValue(); if(value != null) { if(value instanceof AppTopButtonSectionVo) return true; else if(value instanceof AppTopButtonVo) { return ((AppTopButtonVo)value).getAction() != null && (((AppTopButtonVo)value).getAction().equals(TopButtonAction.URL) || ((AppTopButtonVo)value).getAction().equals(TopButtonAction.FORM)); } } return false; }
private void addButton(AppTopButtonVo value, boolean select) { if(value != null) { addButton(form.treItems().getSelectedNode(), value, select); updateControlsState(); if(value.getAction() != null && value.getAction().equals(TopButtonAction.FORM)) form.treItems().beginEditSelectedNode(); } }