6 Replies Latest reply on May 29, 2008 8:05 AM by rohanmars

    pageflow breaks ajax

    rohanmars Newbie

      JBoss 4.2.2.GA
      Seam 2.0.1.GA

      When you use an ajax call like a4j:support from a page that is in a pageflow conversation the whole page is sent and rerendered. Defeats the whole point and I think it's a bug.

      I proved this by using a simple ajax page without a pageflow and it worked correctly. Then I started a simple pageflow as a start-state testpage then when the ajax call is made a full refresh is done.

      Any ideas on how to make this work.


        • 1. Re: pageflow breaks ajax
          Damian Harvey Apprentice

          Show your page code containing the a4j:support tag.



          • 2. Re: pageflow breaks ajax
            rohanmars Newbie

            basic page is:

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml"
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
                    <h:form id="IndexForm">
                             value="#{signinAction.test}" size="35"
                             maxlength="50" required="true" requiredMessage="#{msgs.REQUIRED_FIELD}" label="Amount"
                                    <a4j:support event="onkeyup" eventsQueue="amount" requestDelay="1000" reRender="myvalue"/>
                    <h:outputText id="myvalue" value="value: #{signinAction.test}----"/>

            then use a page flow:

            <?xml version="1.0"?>
                xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
               <start-state name="start">
                  <transition to="test"/>
               <page name="test" view-id="/main/test.xhtml">
                  <transition to="test"/>

            backed by a bean:

            public class SigninAction implements Signin
                public String getTest()
                    return mValue;
                public void setTest(String pvalue)
                    mValue = pvalue;
                @Begin(pageflow="test", nested=true)
                public void testStart()

            and called from another page:

            <h:commandLink action="#{signinAction.testStart}">
                 <h:outputText value="Test"/>

            if you drectly access the page then all is okay, however if you access from pageflow then a full page refresh is done on each keyup.

            additionally, I tried with the latest 2.1 snapshot and jbpm 3.2.2 with the same effect.

            tried both client and server saving_state_method (s). also tried a4j regions and outputPanels.


            • 3. Re: pageflow breaks ajax
              Marcell Newbie

              Try use the limitToList=true and ajaxSingle=true at a4j:support.
              If it is a validation action you can also use bypassUpdates=false.

              • 4. Re: pageflow breaks ajax
                Marcell Newbie

                Sorry, for validation is bypassUpdates=true.

                • 5. Re: pageflow breaks ajax
                  Pete Muir Master

                  I think I've heard of this before. Please create a bug in JIRA, and attach an example we can use to reproduce.

                  • 6. Re: pageflow breaks ajax
                    rohanmars Newbie

                    FYI: Found the problem.

                    The problem was I the unamed transition in the page, like:

                    <page name="billercode" view-id="/bill/billerCode.xhtml">
                          <transition to="billercode"/>

                    Relic from my previous app version (not sure why I put these back in seam 1.x  ...