@Override
public void build(final PropertyDescriptor<P, E> property, final RenderContext context) {
Validate.notNull(property, "Descriptor may not be null.");
Validate.notNull(context, "Render context may not be null.");
final Deque<PropertyDescriptor<?, ?>> prefixes = context.getPrefixDeque();
this.buildLabel(property, context);
this.buildMessages(property, context);
this.input = new HtmlOutputText();
this.addValue(this.input, prefixes, property, context);
this.input.setId(this.compileInputName(prefixes));
this.input.setStyleClass(context.resolveStyleClass(JsfStyleClasses.FORM_INPUT_ROTEXT));
final PresentationPropertyDescriptor<?, ?> presentationProperty = property.adapt(PresentationPropertyDescriptor.class);
String format = null;
if (!CheckUtil.isNull(presentationProperty)) {
format = presentationProperty.getFormat();
}
if (!CheckUtil.isNull(format)) {
final HtmlFormat htmlFormat = new HtmlFormat();
htmlFormat.setFormat(format);
this.input.getFacets().put("format", htmlFormat);
}
}