I have the following part of a .xhtml page:
<ui:composition template="./templates/template.xhtml"> <ui:define name="mainContent"> <ui:include src="include/includeAbleEditor.xhtml"> <ui:param name="includeParam" value="MyClass" /> </ui:include> <ui:include src="include/includeAbleEditor.xhtml"> <ui:param name="includeParam" value="YourClass" /> </ui:include> </ui:define> In the "includeAbleEditor.xhtml" I want to call a method after it was included (In this case this should happend two times).
Now I tried to solve it like this: (metadata tag is part of the includeAbleEditor.xhtml)
<f:metadata> <f:event type="preRenderView" listener="#{editor.onload}" /> <f:attribute name="textFieldId" value="#{includeParam}" /> </f:metadata> The Problem:
The method is being called only once. But it should be called two times. Once with the parameter "MyClass" and once with "YourClass".
Do you have any suggestions?
Thanks a lot!