{
outcome = "/" + outcome;
}
link.putAttribute("outcome", outcome + "/" + controllerName + "/view");
StandardBindingProcessor bindingProcessor = metawidget.getWidgetProcessor(StandardBindingProcessor.class);
if (bindingProcessor != null)
{
bindingProcessor.processWidget(link, elementName, attributes,
(StaticUIMetawidget) metawidget);
}
link.putAttribute("rendered",
StaticFacesUtils.wrapExpression("!empty " + StaticFacesUtils.unwrapExpression(link.getValue())));
String reverseKey = "id";
if (attributes.containsKey(REVERSE_PRIMARY_KEY))
{
reverseKey = attributes.get(REVERSE_PRIMARY_KEY);
}
Param param = new Param();
param.putAttribute("name", "id");
param.putAttribute(
"value",
StaticFacesUtils.wrapExpression(StaticFacesUtils.unwrapExpression(link.getValue())
+ StringUtils.SEPARATOR_DOT_CHAR
+ reverseKey));
link.getChildren().add(param);
return link;
}
Class<?> clazz = ClassUtils.niceForName(type);
if (clazz != null)
{
// 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));