2 Replies Latest reply on Oct 22, 2009 4:59 AM by ilya_shaikovsky

    How to reduce page size

    krasig

      Hi folks,
      I have a BIG problem and I need help.

      So, I have a veeery big page (with many,many components ~900K)

      So i decided to split the page up into many rich:modalPanel
      I hoped that thеsе dialogs will be loaded only when user press buton invoking XXXX.show() method.

      I was surprised that size of my page isn't reduced.
      All source of rich:modalPanel is on the page but is not visible.

      Do you know any way to load rich:modalPanel only when method .show is invoked 

      Regards

        • 1. Re: How to reduce page size
          elf

          you can
          invoke action pressing button,
          build in action part of modalPanel DOM programmatically,
          refresh modalPanel
          and using onComplete event show it.

          • 2. Re: How to reduce page size
            ilya_shaikovsky

            yes, as you could see we are talking about show() and hide() as about client side api in all guidelines. So panels already on the page. Just use conditional rendering fro panels or for content of the panels and use a4j: action controls to load actual content and show the panel using oncomplete as elf proposed.