6 Replies Latest reply on Jan 22, 2008 5:57 AM by Ilya Shaikovsky

    problem with a4j:include - not working

    Abhisek Jana Newbie

      Hi,
      I am using a4j:include to load 3 jsp pages one after another. I have followed the same type code given in the demo page, but facing issues after submitting each page. I am clicking several times on the a4j:commandButton to load the next page.Even, when i am trying to call a method using action tag of the commandButton, the method is not getting called all the time.
      Out of 10 times only two times the method is getting called. I am not sure whats the issue is but need to fix this as the whole functionality has build up on this and users will not click 5-6 times on a button to submit the request.
      I am using RAD 7 and 6.1 server.
      Any help will be greatly appreciated.

      Thanks,
      Abhisek Jana

        • 2. Re: problem with a4j:include - not working
          Abhisek Jana Newbie

          Hi,
          Thank you very much for the reply.I have 3 pages to navigate. I have to click 10 times on a button to get the next page or submit the values.Sometimes the navigation is also not working. Is there any trick that i am missing? I tried to put the rich:panel into a a4j:outputpanel but that didnt work too. Please let me know if you need any more details.

          Main Page:

          <a4j:keepAlive beanName="usercontroller" />
          <rich:panel id="details" id="a007" style="z-index:1;" >
           <f:facet name="header">
           <h:outputText value="Enter Details" id="a008"/>
           </f:facet>
           <h:form>
           <a4j:include viewId="/page1.jsp" id="a0001"/>
           </h:form>
          </rich:panel>


          page1.jsp:


          <div style="position:relative;">
          <h:panelGrid>......</h:panelGrid>
          <div class="navPanel">
          <a4j:commandButton id="page1_next"
           reRender="details" image="/images/next.png" action="next" /></div>
          </div>


          page2.jsp:


          <div style="position:relative;">
          <h:panelGrid>......</h:panelGrid>
          <div>
          <a4j:commandButton
           image="/images/previous.png" id="page2_prev" immediate="true"
           action="previous" />
          <a4j:commandButton image="/images/next.png" id="page2_next"
           action="next" reRender="details" /></div>
          </div>


          page3.jsp:

          <div style="position:relative;">
          <h:panelGrid>......</h:panelGrid>
          <div>
          <a4j:commandButton
           image="/images/previous.png" id="page3_prev" immediate="true"
           action="previous" />
          <a4j:commandButton image="/images/next.png" id="page3_submit"
           action="submitRequest" /></div>
          </div>


          faces-config.xml :

          <navigation-rule>
           <from-view-id>/page1.jsp</from-view-id>
           <navigation-case>
           <from-outcome>next</from-outcome>
           <to-view-id>/page2.jsp</to-view-id>
           </navigation-case>
          </navigation-rule>
          <navigation-rule>
           <from-view-id>/page2.jsp</from-view-id>
           <navigation-case>
           <from-outcome>previous</from-outcome>
           <to-view-id>/page1.jsp</to-view-id>
           </navigation-case>
           <navigation-case>
           <from-outcome>next</from-outcome>
           <to-view-id>/page3.jsp</to-view-id>
           </navigation-case>
          </navigation-rule>
          <navigation-rule>
           <from-view-id>/page3.jsp</from-view-id>
           <navigation-case>
           <from-outcome>previous</from-outcome>
           <to-view-id>/page2.jsp</to-view-id>
           </navigation-case>
          </navigation-rule>
          


          • 3. Re: problem with a4j:include - not working
            Abhisek Jana Newbie

            one small correction,

            in page3.jsp pls assume action="submitRequest" as action="#{usercontroller.submitRequest}"

            Thanks,
            Abhi

            • 4. Re: problem with a4j:include - not working
              Stuart Bedoll Newbie

              I am having the same problem with the same environment. Using richfaces version 3.1.3 and facelets 1.1.13. The code is exactly that from the live demo page for a4j:include. Was this resolved ?

              • 5. Re: problem with a4j:include - not working
                Ilya Shaikovsky Master

                please fill the bug in our jira with the working war (with libs) attached for reproducing.

                • 6. Re: problem with a4j:include - not working
                  Ilya Shaikovsky Master

                  also please check server side messages and client side a4j:log to check for errors appeared.