use of com.codename1.rad.nodes.PropertyViewDecoratorNode in project CodeRAD by shannah.
the class DefaultPropertyViewFactory method createPropertyView.
@Override
public PropertyView createPropertyView(Entity entity, FieldNode field) {
PropertyViewFactory typeFactory = registry.get(field.getWidgetType(entity.getEntity().getEntityType()));
if (typeFactory == null) {
throw new IllegalArgumentException("Type " + field.getWidgetType() + " not supported");
}
PropertyView out = typeFactory.createPropertyView(entity, field);
PropertyViewDecoratorAttribute decoratorAtt = (PropertyViewDecoratorAttribute) field.findAttribute(PropertyViewDecoratorAttribute.class);
if (decoratorAtt != null) {
out = decoratorAtt.getValue().decorate(out);
}
NodeList decorators = field.getChildNodes(PropertyViewDecoratorNode.class);
if (decorators != null) {
for (Node n : decorators) {
out = ((PropertyViewDecoratorNode) n).getValue().decorate(out);
}
}
return out;
}
Aggregations