// odd/even style
item.add(new SimpleAttributeModifier("class",
item.getIndex() % 2 == 0 ? "even" : "odd"));
// dump the attribute information we have
AttributeTypeInfo attribute = (AttributeTypeInfo) item.getModelObject();
item.add(new Label("name", attribute.getName()));
item.add(new Label("minmax", attribute.getMinOccurs() + "/" + attribute.getMaxOccurs()));
try {
// working around a serialization issue
FeatureTypeInfo typeInfo = (FeatureTypeInfo) model.getObject();
final ResourcePool resourcePool = GeoServerApplication.get().getCatalog().getResourcePool();
final FeatureType featureType = resourcePool.getFeatureType(typeInfo);
org.opengis.feature.type.PropertyDescriptor pd = featureType.getDescriptor(attribute.getName());
String typeName = "?";
String nillable = "?";
try {
typeName = pd.getType().getBinding().getSimpleName();
nillable = String.valueOf(pd.isNillable());
} catch(Exception e) {
LOGGER.log(Level.INFO, "Could not find attribute " + attribute.getName() + " in feature type " + featureType, e);
}
item.add(new Label("type", typeName));
item.add(new Label("nillable", nillable));
} catch(IOException e) {
item.add(new Label("type", "?"));