public List<SelectItem> getPropertyList() { List<SelectItem> propertyNames = new ArrayList<SelectItem>(); TablePropertyDefinition[] propDefinitions = TablePropertyDefinitionUtils .getDefaultDefinitionsForTable(TABLE_TYPE, InheritanceLevel.TABLE, true); SelectItem selectItem = new SelectItem(""); selectItem.setLabel(""); propertyNames.add(selectItem); Map<String, List<TablePropertyDefinition>> propGroups = TablePropertyDefinitionUtils .groupProperties(propDefinitions); for (Map.Entry<String, List<TablePropertyDefinition>> entry : propGroups.entrySet()) { List<SelectItem> items = new ArrayList<SelectItem>(); for (TablePropertyDefinition propDefinition : entry.getValue()) { String propName = propDefinition.getName(); if (propDefinition.getDeprecation() == null) { items.add(new SelectItem(propName, propDefinition.getDisplayName())); } } if (!items.isEmpty()) { SelectItemGroup itemGroup = new SelectItemGroup(entry.getKey()); itemGroup.setSelectItems(items.toArray(new SelectItem[items.size()])); propertyNames.add(itemGroup); } } return propertyNames; }
public List<SelectItem> getPropertyList() { List<SelectItem> propertyNames = new ArrayList<SelectItem>(); TablePropertyDefinition[] propDefinitions = TablePropertyDefinitionUtils .getDefaultDefinitionsForTable(TABLE_TYPE, InheritanceLevel.TABLE, true); SelectItem selectItem = new SelectItem(""); selectItem.setLabel(""); propertyNames.add(selectItem); Map<String, List<TablePropertyDefinition>> propGroups = TablePropertyDefinitionUtils .groupProperties(propDefinitions); for (Map.Entry<String, List<TablePropertyDefinition>> entry : propGroups.entrySet()) { List<SelectItem> items = new ArrayList<SelectItem>(); for (TablePropertyDefinition propDefinition : entry.getValue()) { String propName = propDefinition.getName(); if (propDefinition.getDeprecation() == null) { items.add(new SelectItem(propName, propDefinition.getDisplayName())); } } if (!items.isEmpty()) { SelectItemGroup itemGroup = new SelectItemGroup(entry.getKey()); itemGroup.setSelectItems(items.toArray(new SelectItem[items.size()])); propertyNames.add(itemGroup); } } return propertyNames; }
.groupProperties(propDefinitions); for (Map.Entry<String, List<TablePropertyDefinition>> entry : propGroups.entrySet()) { List<SelectItem> items = new ArrayList<SelectItem>();
.groupProperties(propDefinitions); for (Map.Entry<String, List<TablePropertyDefinition>> entry : propGroups.entrySet()) { List<SelectItem> items = new ArrayList<SelectItem>();