2 Replies Latest reply on Jul 23, 2009 6:43 PM by nbelaevski

    'System working' modal box

    vrelits

      Hi!

      I'm converting an existing application to JBoss Richfaces. It uses some js to display a modal box with 'System working...' during HTTP requests.

      //Shows the "system working" page before when the page is being unloaded
       window.onbeforeunload = function(){
       if (stopPageBlock == 0) {
       pageLoading(hideErrorElem);
       toggleSelectDisplay("off");
       }
       }
      

      Now my question is:

      * How to do this in Richfaces. a4j:status seems only to work on ajax request and not normal http request

      Also the above code only works in IE.

      Any tips for how to do this is very welcome.

      Regards,

      Jesper

        • 1. Re: 'System working' modal box
          bolsover

          Not sure if this applies to your situation but I solved a similar problem using a4j:support tag to trigger a modalDialog box...

           <rich:menuItem immediate="true" action="#{ProductListBean.actionQuoteAdd}" >
           <h:outputText value="Add to Quote" ></h:outputText>
           <a4j:actionparam name="rowid" value="{rowid}" ></a4j:actionparam>
           <a4j:support status="waitStatus" event="onselect" />
          </rich:menuItem>
          
          <a4j:status
           id="waitStatus"
           forceId="true"
           onstart="javascript:Richfaces.showModalPanel('waitModalPanel');"
           onstop="javascript:Richfaces.hideModalPanel('waitModalPanel');"/>
           <rich:modalPanel
           id="waitModalPanel"
           autosized="true"
           width="200"
           height="120"
           moveable="false"
           resizeable="false">
           <h:outputText value="Please wait..."/><h
           </rich:modalPanel>
          
          


          • 2. Re: 'System working' modal box
            nbelaevski

            Hi Jesper,

            The problem can be in any of these functions:

            pageLoading(hideErrorElem);
             toggleSelectDisplay("off");