6 Replies Latest reply on May 23, 2011 12:13 PM by Lukáš Fryč

    Nested a4j:ajax for GAE

    Chris Lenz Newbie

      At the moment I have a Problem with a nested a4j:ajax on GAE. Locally everything works fine, but on GAE the second a4j:ajax does not arrive the server.

       

      <ui:define name="navigation">
           <h:form>
                <h:selectManyCheckbox id="trackinggroups" value="#{navigatorBean.trackinggroupsSelection}" layout="pageDirection"
                     valueChangeListener="#{navigatorBean.trackinggroupsChanged}">
                   <f:selectItems value="#{navigatorBean.trackinggroups}"/>
                   <a4j:ajax event="valueChange" render="trackingidspanel" execute="@this"/>
                </h:selectManyCheckbox>
                <hr/> 
                <a4j:outputPanel id="trackingidspanel" layout="block">
                 <h:selectManyCheckbox id="trackingids" value="#{navigatorBean.trackingidsSelection}" layout="pageDirection"
                    valueChangeListener="#{navigatorBean.trackingidsChanged}">
                    <f:selectItems value="#{navigatorBean.trackingids}"/>
                    <a4j:ajax event="valueChange" oncomplete="change(#{navigatorBean.ajaxResult})" execute="@this"/>
                 </h:selectManyCheckbox>
                 </a4j:outputPanel>
           </h:form>       
      </ui:define>
      

       

      The first a4j:ajax tag works fine and the 2nd selectManyBox also arrives, but the 2nd a4j:tag does not work.

      In the a4j:log I get:

       

       

       

      info [00:08:59.442]: Received 'begin' event from <input id=j_idt45:trackingids:0 ...>

      info [00:08:59.753]: Received 'beforedomupdate' event from <input id=j_idt45:trackingids:0 ...>

      info [00:08:59.757]: Listing content of response changes element:
      Element update for id=javax.faces.ViewState
      <update id="javax.faces.ViewState"><![CDATA[H4sIAAAAAAAAANVae2gcxxmfPeksy5YTSX7URih2bdnBqXR6+E5WLNLoYTm+5iyruqtaR9Dr3O34bqW93c3s3EsmJqGvP0IgIU6bEpukkEKgLrSYJk0gKSWUloBdEkgLDYESCqWBpv6jpZD+02929/Zx2tPdyWpz3T9Gs7czs9/ve3/f6vrfUFDTKepZwQUcyjNJDp3FevYc1oIdf/zV2/u+8W4bCpxBO2QVi2dwmqk0ijpZlhI9q8piSXtwCvFrp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37p9ssTa5M3Zox81KAcis+D/g0JW9036SyEKdOiayqhYzQNFk8b9UMOelk6DX7FTFITvA9G6AY2taETE5YdsVV9VokT9sbpbz/3vV+8Fm4zOpRdcEy39Q1FgPzK1YLTeOOkVNtU7TrJr6+09R6PDzfWu69w5P6tC+CceWhT0ZnPg044cKibaEHq1mzqTrYgdd+CCqCS5ud1V2Xo7WY2mnD+15zFlmcW22U1EyJp3clThafttGKLg/Smu4VCjyuDi9xB7fjZ8Xkb57OrGhB+7ABqpnBskZSUIzjkgHkDwAQ5GP/2VfU3k6Fa/RIexhdVte6XjW2QebCo6P2kEVUYyRDa+9FLL//rie9OBPgnSeuThifEz+dzKUK/c/25/p1X/vSk1ToTbjbjc5ab8jl2aOQ3uDr8VWK7u0qJNNEXEq60hkowdLfr24fXpXzgIBv7f7TeXgdZXFoj1GPJH8MC8/8qkoZGJ/lnN56kJs/OTZ/e0mB3Ry7UIHgjUm0ZNVMjt4yM9jgymlEpVEGeTl6gXSv9B9XSNKv3IwAA]]></update>
      Element extension for id=org.richfaces.extension
      <extension id="org.richfaces.extension"><complete>change();</complete></extension>

      info [00:08:59.758]: Received 'success' event from <input id=j_idt45:trackingids:0 ...>

      info [00:08:59.759]: Received 'complete' event from <input id=j_idt45:trackingids:0 ...>

       

      But the request never arrives in the Bean:


      public void trackingidsChanged(ValueChangeEvent event) {
                          log.warning("trackingidsChanged");
      
      

       

       

      Can anyone help?

       

      Chris

        • 1. Nested a4j:ajax for GAE
          Nick Belaevski Master

          Hi Chris,

           

          What JSF version do you use?

          • 2. Nested a4j:ajax for GAE
            Chris Lenz Newbie

            I use following libs:

            antlr-2.7.6.jar

            appengine-api-1.0-sdk-1.4.2.jar

            appengine-api-labs-1.4.2.jar

            appengine-jsr107cache-1.4.2.jar

            asm-3.1.jar

            cglib-2.2.jar

            commons-collections-3.1.jar

            cssparser-0.9.5.jar

            datanucleus-appengine-1.0.8.final.jar

            datanucleus-core-1.1.5.jar

            datanucleus-jpa-1.1.5.jar

            dom4j-1.6.1.jar

            el-api-2.1.2-b04.jar

            el-impl-2.1.2-b04.jar

            geronimo-jpa_3.0_spec-1.1.1.jar

            geronimo-jta_1.1_spec-1.1.1.jar

            guava-r08.jar

            hibernate-commons-annotations-3.2.0.Final.jar

            hibernate-core-3.6.3.Final.jar

            hibernate-entitymanager-3.6.3.Final.jar

            hibernate-jpa-2.0-api-1.0.0.Final.jar

            hibernate-validator-4.1.0.Final.jar

            hsqldb-j5-2.0.0.jar

            javassist-3.12.0.GA.jar

            jdo2-api-2.3-eb.jar

            jsf-api-2.0.3-b03.jar

            jsf-impl-2.0.3-b03.jar

            jsr107cache-1.1.jar

            jstl-1.2.jar

            jta-1.1.jar

            protobuf-java-2.4.0a.jar

            richfaces-components-api-4.1.0-SNAPSHOT.jar

            richfaces-components-ui-4.1.0-20110506.130024-30.jar

            richfaces-core-api-4.1.0-20110506.130024-30.jar

            richfaces-core-impl-4.1.0-20110506.130024-30.jar

            sac-1.3.jar

            serializer-2.7.1.jar

            slf4j-api-1.5.8.jar

            slf4j-jdk14-1.5.8.jar

            validation-api-1.0.0.GA.jar

            xalan-2.7.1.jar

            xercesImpl-2.9.1.jar

            xml-apis-1.3.04.jar

            • 3. Nested a4j:ajax for GAE
              Chris Lenz Newbie

              So what I find out:

              https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine

               

              says:

              <!-- ***** GAE 1.3.0 appears to handle server-side state saving. *****  -->
                <context-param>
                  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                  <param-value>server</param-value>
                </context-param>

              but

              http://community.jboss.org/wiki/HowtouseRichFaces40withGoogleAppEngine

              tells you to use client instead.

              -> I can tell you, the above works only with "server" -> don't know why.

               

              by the way, this can alo be done with normal jsf2 an f:ajax

                <h:form>

                                            <h:panelGroup id="focker">

                                            <h:selectManyCheckbox id="trackinggroups" value="#{navigatorBean.trackinggroupsSelection}" layout="pageDirection"

                                                      valueChangeListener="#{navigatorBean.trackinggroupsChanged}">

                                                                    <f:selectItems value="#{navigatorBean.trackinggroups}"/>

                                                                    <f:ajax execute="@form" event="valueChange" render="focker"/>

                                            </h:selectManyCheckbox>

                                            <hr/>

                                   <h:selectManyCheckbox id="trackingids" value="#{navigatorBean.trackingidsSelection}" layout="pageDirection"

                                    valueChangeListener="#{navigatorBean.trackingidsChanged}">

                                                                    <f:selectItems value="#{navigatorBean.trackingids}"/>

                                                                    <f:ajax execute="@form" event="valueChange" render="focker"/>

                                            </h:selectManyCheckbox>

                          <script type="text/javascript">change(#{navigatorBean.ajaxResult});</script>

                                            </h:panelGroup>  

                                            </h:form>

              • 4. Nested a4j:ajax for GAE
                Lukáš Fryč Master

                Hi Chris, could you please report an RF issue that we can track this issue?

                Providing a standalone sample would be great.

                • 5. Nested a4j:ajax for GAE
                  Chris Lenz Newbie

                  yes I will do that, but I found that it is not a rich face specific thing, its also with plain vanilla jsf.

                  • 6. Nested a4j:ajax for GAE
                    Lukáš Fryč Master

                    Oh, nice catch!

                     

                    Could you to report issue agaist Spring WebFlow (Faces Component) with your findings and post the JIRA link?