private AppFormMenuActionsVoCollection getSelection() { AppFormMenuActionsVoCollection result = new AppFormMenuActionsVoCollection(); for(int x = 0; x < form.treFormActions().getNodes().size(); x++) { TreeNode node = form.treFormActions().getNodes().get(x); if(node.getValue() instanceof IAppForm) { MenuActionVoCollection checkedActions = new MenuActionVoCollection(); for(int y = 0; y < node.getNodes().size(); y++) { TreeNode childNode = node.getNodes().get(y); if(childNode.isChecked() && childNode.getValue() instanceof MenuActionVo) { checkedActions.add((MenuActionVo)childNode.getValue()); } } if(checkedActions.size() > 0) { AppFormMenuActionsVo item = new AppFormMenuActionsVo(); item.setID_AppForm(((IAppForm)node.getValue()).getFormId()); item.setMenuActions(checkedActions); result.add(item); } } } return result; }
private void processMenuActionsSelection(AppFormMenuActionsVo formActions) { int formID = formActions.getID_AppForm(); for(int x = 0; x < formActions.getMenuActions().size(); x++) { addMenuAction(getAppForm(formID), formActions.getMenuActions().get(x)); } }
public MenuActionVoCollection getMenuActions(ims.framework.interfaces.IAppForm form) { if(form == null) throw new DomainRuntimeException("Invalid form"); AppForm domainObject = (AppForm)getDomainFactory().getDomainObject(AppForm.class, form.getFormId()); AppFormMenuActionsVo vo = AppFormMenuActionsVoAssembler.create(domainObject); return vo.getMenuActions(); }