EDITED
I would like to use
<h:body onload="#{myBean.initialize}">
but the function initialize() is not called in my JSF page and I don't undertsand why. Thanks in advance
The structure of the page is
<html>
<h:body onload="#{myBean.initialize}">
<p:layout>
<ui:composition>
<ui:define>
<p:layoutUnit>
<h:form>
<p:panel>
<h:panelGrid>
.....
</h:panelGrid>
</p:panel>
</h:form>
</p:layoutUnit>
</ui:define>
</ui:composition>
</p:layout>
</h:body>
</html>
EDITED
I am using
<p:remoteCommand name="onload" action="#{editUDBean.init}" autoRun="true"/>
just after the
<h:form>
and this calls the init function