Reputation: 63
I have the following in my jsf xhtml page:
<h:body>
<ui:define name="metadata">
<f:metadata>
<f:viewParam name="dummy"/>
<f:event type="preRenderView" listener="#{bean.getDataMethod}"/>
<f:attribute name="param1" value="${param.param1}"></f:attribute>
<f:attribute name="param2" value="${param.param2}"></f:attribute>
</f:metadata>
</ui:define>
<p:dialog header="Modify" widgetVar="modDialog" height="650" width="1500" resizable="false" showEffect="explode" modal="true" draggable="false" hideEffect="explode">
<p:panel id="modifyPanel">
<c:if test="#{null != bean.databean}">
<ui:include src="modifyData.xhtml"></ui:include>
</c:if>
</p:panel>
</p:dialog>
</h:body>
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.
Upvotes: 4
Views: 9132
Reputation: 1108692
Just set its visible
attribute to true
.
<p:dialog ... visible="true">
If you intend to display it on a condition which is determined during preRenderView
, then just bind it to a boolean bean property the usual way.
<p:dialog ... visible="#{bean.dialogVisible}">
Upvotes: 12