if (!def.isHidden() && isResourcePropertyDefinition(resource, d)) {
String value = def.getDefaultValue();
if (resource != null) {
value = Property.getProperty(new ResourceKey(def.getName(), resource.getResourceType(), resource.getResourceId()));
}
AttributeValueItem item = new AttributeValueItem(def, request, value, getSubCategoryString(resource));
userAttributeValueItems.add(item);
}
}
/*
* Sort the list of items and build up the list of categories
*/
Collections.sort(userAttributeValueItems);
categoryIds = new ArrayList<String>();
categoryTitles = new ArrayList<String>();
for (Iterator i = userAttributeValueItems.iterator(); i.hasNext();) {
AttributeValueItem item = (AttributeValueItem) i.next();
int idx = categoryIds.indexOf(item.getCategoryId());
if (idx == -1) {
categoryIds.add(item.getCategoryId());
categoryTitles.add(item.getCategoryLabel());
}
}
}