/** * */ private void setBusinessRuleCategoryTree() { // Clear the tree form.treRootEntity().getNodes().clear(); // Get business rule categories BusinessRuleCategoryCollection ruleCategoryCollection = ims.admin.vo.lookups.LookupHelper.getBusinessRuleCategory(this.domain.getLookupService()); // If the rules categories are missing - interupt if (ruleCategoryCollection == null) return; // Set the category nodes for (int i = 0; i < ruleCategoryCollection.size(); i++) { BusinessRuleCategory businessRuleCategory = ruleCategoryCollection.get(i); if (businessRuleCategory != null && businessRuleCategory.getParent() == null) { // Set node value TreeNode node = form.treRootEntity().getNodes().add(businessRuleCategory, businessRuleCategory.getText()); node.setIdentifier(new Integer(0)); node.setText(((BusinessRuleCategory) node.getValue()).getText() + " (" + node.getIdentifier().toString() + ")"); // Add sub categories setTreeNodeSubCategories(node, businessRuleCategory); } } }