// FIXME: use created UIOutput Label
// FIXME: see outcommented part
writer.startElement(HtmlConstants.LABEL, null);
// todo: use label component with a "light" markup
StyleClasses styleClasses = new StyleClasses();
styleClasses.addAspectClass("label", StyleClasses.Aspect.DEFAULT);
if (item.isDisabled() || disabled) {
styleClasses.addAspectClass("label", StyleClasses.Aspect.DISABLED);
}
if (readonly) {
styleClasses.addAspectClass("label", StyleClasses.Aspect.READONLY);
}
writer.writeClassAttribute(styleClasses);
writer.writeAttribute(HtmlAttributes.FOR, id, false);
writer.writeText(item.getLabel());
writer.endElement(HtmlConstants.LABEL);