// If it's an inverse relationship, we really should have been able to determine sub-properties, so we
// should never be at 'entity' level *unless* componentType couldn't resolve to an actual type
if (!ENTITY.equals(elementName))
{
StaticHtmlMetawidget footerMetawidget = new StaticHtmlMetawidget();
Map<String, String> footerAttributes = CollectionUtils.newHashMap();
metawidget.initNestedMetawidget(footerMetawidget, footerAttributes);
footerMetawidget.setValue(StaticFacesUtils.wrapExpression(controllerName + "Bean.add." + columnName));
footerMetawidget.setPath(componentType + StringUtils.SEPARATOR_FORWARD_SLASH_CHAR + columnName);
footerMetawidget.setLayout(new SimpleLayout());
Facet footerFacet = new Facet();
footerFacet.putAttribute("name", "footer");
footerFacet.getChildren().add(footerMetawidget);
ReadableIdProcessor readableIdProcessor = metawidget.getWidgetProcessor(ReadableIdProcessor.class);
if (readableIdProcessor != null)
{
readableIdProcessor.processWidget(footerMetawidget, elementName, columnAttributes, metawidget);
}
HtmlMessage message = new HtmlMessage();
message.putAttribute("for", footerMetawidget.getAttribute("id"));
message.putAttribute("styleClass", "error");
footerFacet.getChildren().add(message);
column.getChildren().add(footerFacet);
}
}