In complex JSF web applications, you sometimes need to re-render (i.e. update via AJAX) a component located outside of the current form (note that forms should not be nested). While you can access a composite’s parent in EL using the #{cc.parent}
attribute, this is not of much help if your component is deeply nested in a different sub-tree of the component hierarchy. Read more…
…is not supported, as I just found out:
<composite:interface>
<composite:facet name="basketContent"/>
</composite:interface>
<composite:implementation>
<mycomponents:box title="Shopping basket">
<composite:renderFacet name="basketContent"/>
</mycomponents:box>
</composite:implementation>
Read more…
This problem just cost me an hour worth of debugging: Clicking on a PrimeFaces <p:commandButton/>
that was inside a composite component wouldn’t trigger the server-side action that was specified in the tag. Even more strange was that I had several of these buttons (created in a loop using <ui:repeat/>
), and in the generated HTML, the first one wasn’t nested into an HTML form
element, while the others were. Read more…