4 Replies Latest reply on Apr 23, 2011 8:42 AM by jgreiner

    Load Page sections

    jgreiner

      So I have 2 sections of a page.    1 section loads really slow.   There is not much I can do about it except let it run.    What I would like to do is load the 2 sections separtely so the 1 section the user can use and fill in some information, the other section would show a processing icon.    When the second section completes I would display some information in that area, and enable a button on section 1 so the user can continue.

       

      Is this possiable in a4j, and jsf 1.2?   I would also be keen to render the page and then do a partial page post to start section 2 processing. 

       

      Any ideas or direction would be helpful.

       

      Thanks

      Jason

        • 1. Load Page sections
          nbelaevski

          Hi Jason,

           

          Yes, this is possible. Use a4j:jsFunction to initiate load of the second page part using JavaScript.

          • 2. Load Page sections
            jgreiner

            Thanks for the input Nick...

             

            I was heading down that path, but I was not sure how or what event would initiate the jsFunction?   I was playing around with f:view and the f:event but those did not seem to work (I was thinking they may be jsf 2.0 functions).

             

            Thanks again.

            • 3. Load Page sections
              nbelaevski

              Call it from 'onload' attribute of body.

              • 4. Load Page sections
                jgreiner

                Ok I have not tried that because I am using facelet templates so was not 100% sure how...but I will attempt to do that.   I think I should be able to use jquery to add the code to the body onload.   But I am definatly a jquery rookie.

                 

                Thanks