2 Replies Latest reply on Aug 27, 2010 3:54 PM by Rene Gritsch

    reRender modalpanel before opening

    Rene Gritsch Newbie



      i would like to reRender an modal panel before it get opened.




      <h:graphicImage rendered="#{model.available}" oncomplete="Richfaces.showModalPanel('#{id}');" value="${resources.image('changeTab')}">
           <a4j:support event="onclick" bypassUpdates="true" status="waitStatus"/>




      I´ve tried it like this, but i´ve a performance problem with this solution. It takes about 2 before it get opened.

      I´ve also tried to remove the status, but that´s not really the performance problem.


      What would be the right way to do this?

        • 1. Re: reRender modalpanel before opening
          Andreas Hoehmann Newbie
          oncomplete is not a attribute of h:graphicImage ... try this
          <rich:modalPanel id="dialog">
            foobar ...
            <h:outputText value="#{bean.foobar}"/>
            <h:graphicImage rendered="#{model.available}" value="#{resource['foobarimage']}">
             <a4j:support event="onclick"
                          reRender="dialog" limitToList="true"
          if the user click on the image a ajax request starts ... the ajax-response updates the dialog
          and the js-handler (oncomplet) open the dialog. you can also reRender only the inner part of the
          dialog but I'm not sure if this is faster/better than rerender the whole dialog .. maybe in some
          szenarios (dialog should stay open etc.) the reRender of the dialog-content is better

          • 2. Re: reRender modalpanel before opening
            Rene Gritsch Newbie

            Thnx, i´ve recognized my mistake before but thank you anyway!


            I´m reRendering now the inner part of the dialog, i think for the performance it´s about the same.


            Do you know, is there a possibility in richfaces to limit the request parameters.


            For example, i only want to submit a part of the form, i know with a4j:region i can control the server side,

            but i also want to limit the request parameters itself, that for example not the full form is submitted, only 1 field.

            Is there any possibility to do this, without a javascript "hack" ?