p:lightBox opens too early

UI Components for JSF
Post Reply
rippal
Posts: 19
Joined: 26 Jan 2011, 15:59

23 Feb 2011, 18:25

hello there!

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>


when i press the Fill-Button generateForm() is called... this generates a dynamic .xhtml-File on the server which is then available under the given path "#{request.contextPath}/forms/test.xhtml"
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 :!:

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests