writer.write(StringUtils.toString(getLinkValue(helper.hasColumn()), ""));
writer.endElement(tag);
}
else
{ // Add component
HtmlOutcomeTargetLink linkComponent = null;
if (getChildCount() > 0)
{
UIComponent c = getChildren().get(0);
if (c instanceof HtmlOutcomeTargetLink)
linkComponent = (HtmlOutcomeTargetLink)c;
else
{ // Something's wrong here?
log.info("INFO: Unexpected child node for {}! Child item type is {}.", getClass().getName(), c.getClass().getName());
// Check facetComponent
UIPanel facetComponent = (UIPanel)getFacets().get(UIComponent.COMPOSITE_FACET_NAME);
if (facetComponent==null)
{
log.warn("WARN: component's facetComponent has not been set! Using Default (javax.faces.Panel).");
log.warn("Problem might be related to Mojarra 2.1.7 to 2.1.11 (and possibly later) - please use Mojarra 2.1.6!");
facetComponent = (UIPanel)context.getApplication().createComponent("javax.faces.Panel");
facetComponent.setRendererType("javax.faces.Group");
getFacets().put(UIComponent.COMPOSITE_FACET_NAME, facetComponent);
}
}
}
if (linkComponent == null)
{
linkComponent = new HtmlOutcomeTargetLink();
this.getChildren().add(0, linkComponent);
}
// set params
setLinkProperties(linkComponent);
addOrSetParam(linkComponent, "idparam", "id");
// encode link
linkComponent.setRendered(true);
linkComponent.encodeAll(context);
linkComponent.setRendered(false); // Don't render twice!
}
}