8 Replies Latest reply on May 6, 2008 2:49 PM by Anne Childress

    what is happening to a4j:support?

    alberto Gori Novice

      on latest a4j version (the one downloaded from jboss) I see a4j:support is not working.

      It start to work only if I perform a submit to the same page (page A --> pageA).

      For example this simple code doesn't repeat the input data:

      <!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"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich"
      >
       <body>
      
       <h:form id="rgForm2" prependId="false">
      
       <h:inputText value="#{requestScope.text}">
       <a4j:support event="onkeyup" reRender="repeater" />
       </h:inputText>
       <h:outputText id="repeater" value="#{requestScope.text}" />
      
       </h:form>
       </body>
      </html>
      


      It starts to repeat the input data only if first I submit the page (without ajax) for example pressing the enter key.

      Is it broken in the last version..?

      Using jsf 1.2_4 + facelets 1.1.12 (tomcat 5.5).

        • 2. Re: what is happening to a4j:support?
          alberto Gori Novice

          this is my web.xml

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
          
           <listener>
           <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
           </listener>
          
           <listener>
           <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
           </listener>
           <listener>
           <listener-class>studioweb.archery.external.Initializer</listener-class>
           </listener>
          
          
          
           <filter>
           <display-name>Ajax4jsf Filter</display-name>
           <filter-name>ajax4jsf</filter-name>
           <filter-class>org.ajax4jsf.Filter</filter-class>
           </filter>
          
           <filter-mapping>
           <filter-name>ajax4jsf</filter-name>
           <servlet-name>Faces Servlet</servlet-name>
           <dispatcher>REQUEST</dispatcher>
           <dispatcher>FORWARD</dispatcher>
           </filter-mapping>
          
          
           <context-param>
           <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
           <param-value>.xhtml</param-value>
           </context-param>
          
           <context-param>
           <param-name>facelets.DEVELOPMENT</param-name>
           <param-value>true</param-value>
           </context-param>
          
           <context-param>
           <param-name>facelets.LIBRARIES</param-name>
           <param-value>
           /WEB-INF/studioweb.taglib.xml
           </param-value>
           </context-param>
          
           <context-param>
           <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
           <param-value>server</param-value>
           </context-param>
           <context-param>
           <param-name>com.sun.faces.validateXml</param-name>
           <param-value>true</param-value>
           </context-param>
           <context-param>
           <param-name>com.sun.faces.verifyObjects</param-name>
           <param-value>true</param-value>
           </context-param>
          
          
           <!-- Extensions Filter -->
           <filter>
           <filter-name>extensionsFilter</filter-name>
           <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
           </filter>
          
           <filter-mapping>
           <filter-name>extensionsFilter</filter-name>
           <url-pattern>/faces/*</url-pattern>
           </filter-mapping>
          
          
          
           <!-- Faces Servlet -->
           <servlet>
           <servlet-name>Faces Servlet</servlet-name>
           <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
           <load-on-startup>1</load-on-startup>
           </servlet>
          
           <servlet-mapping>
           <servlet-name>Faces Servlet</servlet-name>
           <url-pattern>/faces/*</url-pattern>
           </servlet-mapping>
          
          
           <session-config>
           <session-timeout>30</session-timeout>
           </session-config>
           <welcome-file-list>
           <welcome-file>
           /index.html
           </welcome-file>
           </welcome-file-list>
          
          </web-app>
          


          • 3. Re: what is happening to a4j:support?
            Sergey Smirnov Master

            Do you use FireFox with FireBug extension ?

            • 4. Re: what is happening to a4j:support?
              alberto Gori Novice

              Finally I have discovered that the issue come from prependIf="false".

              If I don't use this feature of jsf 1.2, a4j:support work properly.

              • 5. Re: what is happening to a4j:support?
                Sergey Smirnov Master

                Could you check reRender=":repeater" ?

                • 6. Re: what is happening to a4j:support?
                  Anne Childress Newbie

                  I have found that using prependId="false" effectively renders ajax support on the page disabled. This is a sad situation, but true.

                  • 7. Re: what is happening to a4j:support?
                    Sergey Smirnov Master

                     

                    "achildress" wrote:
                    I have found that using prependId="false" effectively renders ajax support on the page disabled. This is a sad situation, but true.

                    Not sure understand the comment. prependId="false" is a default value. So, you comment sounds like support never works.

                    • 8. Re: what is happening to a4j:support?
                      Anne Childress Newbie

                      prependId is not false by default, it is true by default