i have a problem with the following p:lightBox (in combination with a p:dataTable)
Code: Select all
<p:lightBox iframe="true" width="60%" height="95%"
overlayClose="false" id="lightBox" widgetVar="lightBox">
<h:outputLink value="#{request.contextPath}/forms/test.xhtml"
title="Form">
<p:commandButton value="Fill" ajax="true"
action="#{Generator.generateForm}">
<f:setPropertyActionListener value="#{form}"
target="#{Generator.selectedForm}" />
</p:commandButton>
</h:outputLink>
</p:lightBox>
i want to show this dynamic generated file in the lightBox!
first time i open the lightbox the page could not be found... second time the page is shown..
i think that the lightBox opens before the .xhtml-File is generated... so what can I do to wait until the generateForm()-Function is finished? is this possible?
oncomplete or something else?
thank you very much for your help