title: How can I display a modal dialog after the preRenderView event has been executed in JSF?
body: <p>I have the following in my jsf xhtml page: </p>
  
  <pre><code>&lt;h:body&gt;
   &lt;ui:define name="metadata"&gt;
   &lt;f:metadata&gt;
    &lt;f:viewParam name="dummy"/&gt;
    &lt;f:event type="preRenderView" listener="#{bean.getDataMethod}"/&gt;
    &lt;f:attribute name="param1" value="${param.param1}"&gt;&lt;/f:attribute&gt;
    &lt;f:attribute name="param2" value="${param.param2}"&gt;&lt;/f:attribute&gt;
   &lt;/f:metadata&gt;
   &lt;/ui:define&gt;
  
   &lt;p:dialog header="Modify" widgetVar="modDialog" height="650" width="1500" resizable="false" showEffect="explode" modal="true" draggable="false" hideEffect="explode"&gt;
    &lt;p:panel id="modifyPanel"&gt;
     &lt;c:if test="#{null != bean.databean}"&gt;
      &lt;ui:include src="modifyData.xhtml"&gt;&lt;/ui:include&gt;
     &lt;/c:if&gt;
    &lt;/p:panel&gt;
   &lt;/p:dialog&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p>I need to display the modal dialog box after the preRenderView has been executed. And, I also need to make sure that all data will be displayed in the modal dialog box. </p>