I'm trying to implement a composite component (util:compList
) that holds an event (for instance a row select event), and this event triggers an action in the using page of composite.
The composite code (compList
):
<composite:interface>
<composite:attribute name="list" required="true" type="java.util.Collection" />
<composite:attribute name="onselect" method-signature="void select(org.primefaces.event.SelectEvent)" />
<composite:attribute name="update" />
</composite:interface>
<composite:implementation>
<ui:param name="hasSelectBehavior" value="#{not empty cc.attrs.onselect}" />
<h:form>
<p:dataTable ...>
<p:ajax event="rowSelect"
listener="#{cc.attrs.onselect}"
update="#{cc.attrs.update}" />
<p:column>
Some content here
</p:column>
</p:dataTable>
</h:form>
</composite:implementation>
Using page code:
<util:compList list="#{bean.myList}"
selectvalue="#{bean.myEvent}"
update=":myFormId, :myFormId:myOtherFormComponent" />
This throws the exception:
Cannot find component with expression "myFormId" referenced from "processTab:j_idt159:myFormId:j_idt161:j_idt162:userNotesTable".
I'm aware that the exception reffers to the fact the composite component cannot find the component ids I'm trying to re-render. Is there any other way to do this correctly?