{
// Render read-only booleans as graphics
if (boolean.class.equals(clazz))
{
HtmlOutputText outputText = new HtmlOutputText();
StandardBindingProcessor bindingProcessor = metawidget
.getWidgetProcessor(StandardBindingProcessor.class);
if (bindingProcessor != null)
{
bindingProcessor.processWidget(outputText, elementName, attributes, (StaticUIMetawidget) metawidget);
}
String styleClassEl = StaticFacesUtils.unwrapExpression(outputText.getValue())
+ " ? 'boolean-true' : 'boolean-false'";
outputText.putAttribute("styleClass", StaticFacesUtils.wrapExpression(styleClassEl));
outputText.setValue("");
return outputText;
}
}
}