Posts Tagged ‘JSF2’

JSF2: Finding and re-rendering deeply nested components in different NamingContainers

July 5th, 2011 No comments

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…

JSF2: Rendering facets inside nested composite components

January 27th, 2011 1 comment

…is not supported, as I just found out:

	<composite:facet name="basketContent"/>

	<mycomponents:box title="Shopping basket">
		<composite:renderFacet name="basketContent"/>

Read more…

JSF2: Nesting forms into each other — not a good idea

January 23rd, 2011 No comments

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…