9 Replies Latest reply on Jun 22, 2007 9:10 PM by sergeysmirnov

    Composite application from multiple web contexts

    skidvd

      Hello,

      I'm new 2 ajax4JSF (I've been using AjaxAnywhere), but would like to migrate my application to ajax4JSF as is appears to be a much better fit for JSF.

      However, there is a single feature that I am struggling to find a method to replace. The existing application is "composite" in that, and single browser view will contain rendereings from multiple independent web contexts. This is to say that a given user display might contain the following displays concurrently and independantly operating:

      appA/page1
      appB/page2
      appC/page1
      appD/pageD

      The ajax4JSF combination of
      <a4j:outputPanel id="x" ajaxRendered="true">
      <aj4:include viewId="..."/>
      <a4j:outputPanel>

      appears to come close to what I need if all of the pages were in the same app/web context. However, in my case, the pages that need to be included are in separate web apps and contexts as they are used elsewhere independently. This is accomplished in AjaxAnywhere with simple javascript get requests.

      Can anyonw shed some light on how I might create this required functionality in ajax4JSF?

      TIA!

        • 1. Re: Composite application from multiple web contexts

          Just learn the basic of Ajax4jsf first. Do not recognize Ajax4jsf as an extension for AjaxAnywhere. It is not.

          • 2. Re: Composite application from multiple web contexts
            skidvd

             

            "SergeySmirnov" wrote:
            Just learn the basic of Ajax4jsf first. Do not recognize Ajax4jsf as an extension for AjaxAnywhere. It is not.


            I don't wish to view it as an extension to AjaxAnywhere. I wish to replace AjaxAnywhere with it. This sole feature is all that is preventing that for me.

            • 3. Re: Composite application from multiple web contexts

              The approaches are different.

              <a4j:outputPanel id="x" ajaxRendered="true">
              <aj4:include viewId="..."/>
              <a4j:outputPanel>

              sounds like using microscope as a hammer (possible is general, but unreasonable).

              • 4. Re: Composite application from multiple web contexts
                skidvd

                 

                "SergeySmirnov" wrote:
                The approaches are different.

                <a4j:outputPanel id="x" ajaxRendered="true">
                <aj4:include viewId="..."/>
                <a4j:outputPanel>

                sounds like using microscope as a hammer (possible is general, but unreasonable).



                Sergey,

                Thank you very much for your responses and help. I understand your above comments, but I came to the above approach from the description (and leveraged the code verabtim) from the Ajax4JSF Developers Guide section 6.9.3.

                I'm asking for alternative approaches to accomplish this sort of 'composite' functionality appropriately/properly in Ajax4JSF. What approach would you recommend here?

                Thanks again!

                • 5. Re: Composite application from multiple web contexts

                  section 6.9.3 is about navigation (wizard-like behavior), but not about composition. Actually, wrapping with <a4j:outputPanel ajaxRendered="true"> is not required anymore for <aj4:include viewId="..."/> during the Ajax Navigation.

                  • 6. Re: Composite application from multiple web contexts
                    skidvd

                     

                    "SergeySmirnov" wrote:
                    section 6.9.3 is about navigation (wizard-like behavior), but not about composition. Actually, wrapping with <a4j:outputPanel ajaxRendered="true"> is not required anymore for <aj4:include viewId="..."/> during the Ajax Navigation.


                    Ok, thanks for tip on being able to omit the wrappong outputPanel. Just for clarification, I'm attempting to use compisition (basically a loose approximation of a portal) of multiple apps/context that all navigate independantly ... this is what led me to section 6.9.3. Again, this is working just great if I only had one app. Howver, I have requirements to stich multiple apps together on a single browser window ... ala portal. Can you recommend an approach or alternative?

                    • 7. Re: Composite application from multiple web contexts

                      Independently of Ajax solution, how you are going to have this multi-applications composition using JSF?

                      • 8. Re: Composite application from multiple web contexts
                        skidvd

                         

                        "SergeySmirnov" wrote:
                        Independently of Ajax solution, how you are going to have this multi-applications composition using JSF?


                        The present version of this application (alread working in production as previously stated ... a loose approximation of a portal ... by the way they don't want a real portal for other reasons) with AjaxAnywhere (AA). We carve up the browser real estate into multiple AA zones and the AA.getRequest(...) the various web contexts into the zones. Each of the various contexts is also AA enables so that any further navigation within them will stay in their respective zones. This all works fine with AA, but is very laborious to maintain and not a real good fit for the JSF (all the apps are JSF based). So, this is why I'm considering a switch to ajax4JSF as it will provide some very compelling additional capabilities that AA cannot. However, I need to find a way to maintain the AA composition behaviour. Your thoughts?

                        • 9. Re: Composite application from multiple web contexts

                          No thoughts.