2 Replies Latest reply on Aug 23, 2012 7:10 AM by iabughosh

    "Wait Modal Panel"

    tspragg1025

      I have the situation where when the user makes a call to the managed bean I need to display a "Waiting" Modal panel and poll the database until a value gets updated. When that value gets updated I will return control to the user. The problem is that the Modal panel gets released before the actual database change is made. I need to keep the user from pressing any buttons until the process is complete.

       

      Any Ideas.

       

      I have tried the progress bar to no avail.

       

      I thought of polling or even pushing but not sure how to make this work.

       

      Thanks for any ideas or Help.

        • 1. Re: "Wait Modal Panel"
          mcmurdosound

          which version of richfaces are you using?

           

          do you use an a4j:poll to fetch the data or: check if the database queries are completed?

           

          If you are simple doing an action like from a a4j:commandLink or something similar, you could use a4j:status to show a modaldialog (i'd use jquery dialogs here not the buildin rf modalpanels) when the request begins and hide it when it's done.

          • 2. Re: "Wait Modal Panel"
            iabughosh

            Hello Thomas,

            you can do something like this :

             

            <a4j:commandButton actionListener="#{yourDBPollMethod}"

                                            onbegin="#{rich:component('waitPopup')}.show();"

                                            oncomplete="#{rich:component('waitPopup')}.hide();"/>

             

            regards.