consider a simple composite component which takes an action parameter of some sort - a simple link 'prettifier' for example. i want to 'ajaxify' it.
<composite:interface>
<composite:attribute name="act" method-signature="java.lang.String action()"></composite:attribute>
<composite:attribute name="text" required="true"></composite:attribute>
<composite:clientBehavior name="click" event="action" targets="l"/> </composite:interface>
<composite:implementation>
<h:commandLink id="l" act="#{cc.attrs.action}" immediate="true"> <b>#{cc.attrs.text}</b> </h:commandLink> </composite:implementation>
i expose an event through client behaviour. i use it like this:
<h:panelGroup layout="block" id="outside">
#{mybean.otherdata} <br/>
<mc:mylink text="Click click" action="#{mybean.click}" >
<f:ajax event="click" render="outside"/>"
</mc:mylink><br/>
</h:panelGroup>
you can see what i want to do. i want to do an ajax render OUTSIDE the composite definition. just setting render to "outside" gives the dreaded " contains an unknown id" error.
yes i am aware of naming containers and i know we can prepend with a colon and specify an absolute path, but that's quite clunky. if i wrap it up in several more layers (which is the whole point) i'd have to chain these references together manually.
can i make some sort of relative reference like render="../outside" to skip the reference to the parent container of the component?
i did a jsf 1 app with a4j and this pattern was used all over the place.