3 Replies Latest reply on Jan 22, 2010 6:07 AM by ilya_shaikovsky

    Call onReady function of rich:jquery in ajax request

      Hi all,

      In my application, I am loading a page with the use of <a4j:commandLink>. But here the onReadyFunction of rich:jquery is not called when the page is loaded in the ajax request. Instead if I used <h:commandLink> jQuery works fine in all aspect. Kindly give me a valuable suggestion about how to use rich:jQuery when a page loaded in an ajax request.

        • 1. Re: Call onReady function of rich:jquery in ajax request
          ilya_shaikovsky
          how about using oncomplete?
          • 2. Re: Call onReady function of rich:jquery in ajax request

            Thanks for your immediate reverse. Sorry I didnt explain clearly. Actually I am loading a page from left menu with the use of rich:panelMenu which contains a a4j:commandLink

             

            <rich:panelMenuItem>
                          <a4j:commandLink id="page2LinkId" value="Page2"
                                         action="#{PageViewIdGenerator.sideBarAction}"
                                         reRender="panel">
                          <f:param id="page2ParamId" name="pageViewId" value="Page2"/>
                          </a4j:commandLink>
                     </rich:panelMenuItem>


            So If I clicked the link of page2, page2 will be loaded/included in the content part of my layout. Here I cannot give oncomplete, If I want to use oncomplete I need to use a4j:support and as you know command link doesnt need a4j:support. Rich:jQuery can be used in the included/loaded page if I used h:commandLink instead of a4j:command link. Kindly give me valuable suggestions to use rich:jQuery if the page loaded in an ajax request. Thanks in Advance!!

            • 3. Re: Call onReady function of rich:jquery in ajax request
              ilya_shaikovsky
              any component which provides ajax functionality provides oncomplete. including links and menuitems in ajax mode