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() { AppFormMenuActionsVoCollection actions = form.getGlobalContext().Admin.getSelectedMenuActions(); for(int x = 0; x < actions.size(); x++) { processMenuActionsSelection(actions.get(x)); } }