2 Replies Latest reply on May 15, 2008 6:33 AM by ronanker

    Rendering ModalPanels is very slow

    mvkmahi

      Hello,
      I am using richfaces modal panels for wizard interface functionality and the rendering seems to be very slow. I am using like 10 modal panels.

      I have a parent page with all the model panels as shown below. When the parent page loads it takes long time. So I specified conditions on the modalpanel includes so that they are included only when specified action is invoked, but it still didn't change anything.

      I tried including "rendered" property on the modal panel itself, but when I click a button to launch the wizard, the pop up's don't show.

      Another related issue is that the rendering of even a single modal panel is slow too.

      Is there any thing which can be done to make them fast or a better way to use them.

      Thanks.

      
      <rich:modalPanel id="new" minHeight="600" minWidth="100" width="1100" height="600" left="200" top="150" zindex="500">
       <f:facet name="header">
       <h:outputText value="New" />
       </f:facet>
       <f:facet name="controls">
       <h:graphicImage value="/images/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('new)" />
       </f:facet>
       <a4j:include viewId="/new.jsp" rendered="#{backingBean.newAction}"/>
       </rich:modalPanel>
      
      <rich:modalPanel id="next" minHeight="600" minWidth="100" width="1100" height="600" left="200" top="150" zindex="500">
       <f:facet name="header">
       <h:outputText value="Next" />
       </f:facet>
       <f:facet name="controls">
       <h:graphicImage value="/images/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('next')" />
       </f:facet>
       <a4j:include viewId="/next.jsp" rendered="#{backingBean.nextAction}"/>
       </rich:modalPanel>
      
      <rich:modalPanel id="last" minHeight="600" minWidth="100" width="1100" height="600" left="200" top="150" zindex="500">
       <f:facet name="header">
       <h:outputText value="Last" />
       </f:facet>
       <f:facet name="controls">
       <h:graphicImage value="/images/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('last')" />
       </f:facet>
       <a4j:include viewId="/last.jsp" rendered="#{backingBean.doneAction}"/>
       </rich:modalPanel>
      
      


      All modal panels are invoked on the click of a button as shown below

      <a4j:commandButton id="new" value="New" onclick="ajaxBusy();" action="#{backingBean.createNew}" oncomplete="ajaxIdle();Richfaces.showModalPanel('new')" />
      
      


        • 1. Re: Rendering ModalPanels is very slow
          mvkmahi

          Forgot to mention I am using Richfaces 3.1.4 version.

          • 2. Re: Rendering ModalPanels is very slow
            ronanker

            do you use all modal panels at the same time ?
            wouldn't it be easier to have only one modal panel and change it's content ?

            <a4j:button rerender="panelcontent"...

            Or, as you use a4j:include you can also navigate inside the modal panel... don't know if it's what you wants to do...

            navigation from "new.jsp", case "next" to "next.jsp"
            navigation from "next.jsp", case "next" to "last.jsp", case "previous" to "new.jsp"
            ...