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