1 2 Previous Next 17 Replies Latest reply on Dec 14, 2006 2:28 PM by Gavin King

    Ajax¤JSF with Seam

    Tobias Adamson Newbie

      Hi
      I've been using Seam for a while now.
      I'm currently using 1.0.1 GA with the embedded container in Tomcat.

      Right now I have one page with several datatables on it.
      When a user clicks on a selection on the first table the other two are updated.
      This is currently done via a normal HTTP request but I would like to do this with Ajax4JSF or smiliar instead.

      The problem is that when I use Ajax4JSF I get a PropertyNotFoundException even though it worked with a normal s:link.

      I read Michael Yuan's blog about problems when having an ejb3 jar but I'm not quite sure if it applies here (I got one general.jar with all ejb's including session beans and then views etc in the war).



      The Exception

      javax.el.PropertyNotFoundException: Bean: $Proxy158, property: getCategoryDetails
       at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:146)
       at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
       at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
       at com.sun.facelets.el.ELText$ELTextVariable.toString(ELText.java:174)
       at com.sun.facelets.el.ELText$ELTextComposite.toString(ELText.java:115)
       at com.sun.facelets.compiler.CommentInstruction.write(CommentInstruction.java:38)
       at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:419)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:440)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.renderColumnBody(HtmlTableRendererBase.java:212)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeColumnChild(HtmlTableRendererBase.java:181)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:167)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:100)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:234)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:554)
       at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
       at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
      


      The HTML
      <h:form>
       <h:dataTable var="cat"
       value="#{categoryList}" rendered="#{categoryList.rowCount>0}"
       styleClass="datatable"
       headerClass=""
       rowClasses=""
       columnClasses=""
       >
       <h:column>
       <f:facet name="header">
       <h:outputText value="Name"/>
       </f:facet>
       <!--s:link view-id="../category/overview.html" action="#{listCategoryAction.getCategoryDetails}" value="#{cat.name}"/-->
       <a4j:commandLink value="#{cat.name}" action="#{listCategoryAction.getCategoryDetails}" reRender="childTable" />
       </h:column>
       </h:dataTable>
      </h:form>
      
       <h:form>
       <h:dataTable var="cp"
       value="#{childList}" rendered="#{not empty childList}"
       styleClass="datatable"
       headerClass=""
       rowClasses=""
       columnClasses=""
       id="childTable"
       >
      .....
      </h:dataTable >
      </h:form>


        • 1. Re: Ajax¤JSF with Seam
          Gavin King Master

          I have not looked at Ajax4JSf before, so I can't help you with your immediate problem - try using your debugger.

          Our plan for partial rendering in JSF was to implement something probably quite similar to Ajax4JSF on top of the work that Jacob/Adam/Ed have been doing. Actually I was going to work on that stuff over the next couple of weeks and release it as Seam 1.1.

          However, I will take a closer look at Ajax4JSF and see if it is a better starting point.

          • 2. Re: Ajax¤JSF with Seam
            Tobias Adamson Newbie

            Hi Gavin
            Sorry for not nullifiying this thread.
            It turned out that Facelets when not finding a tag library instead of putting up an ugly error message ingnores it and instead tries to evaluate the EL as a property access.

            Regarding Ajax4JSF it works pretty perfectly for me now and is very easy to use.

            I have tried it within conversations and using DataModels etc and everything works as expected. I would check it out as it looks like it is very similar to the whole idea of Avatar for JSF

            Regards
            Tobias

            • 3. Re: Ajax¤JSF with Seam
              Gavin King Master

              Excellent, I'll try it out.

              • 4. Re: Ajax¤JSF with Seam
                Gus Gu Expert

                Hi TOBAD and Gavin,

                I tried to use the ajax4jsf on JBoss Seam, but unfortunatly, I always got an exception when I run it on JBoss4.0.4.GA:

                java.lang.ClassNotFoundException: No ClassLoaders found for: org.ajax4jsf.framework.util.config.FilterBean
                at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
                at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
                at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java :204)
                .......

                In my web.xml, I added the following codes:
                 <!-- Ajax4JSF Initial parameters -->
                 <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>
                 <url-pattern>/*</url-pattern>
                 </filter-mapping>
                

                I also added the ajax4jsf.jar and oscache-2.2.jar in WEB/lib/.

                I really appreciate it if you can give me some guidance. Thank you in advance.

                GUS

                • 5. Re: Ajax¤JSF with Seam
                  Tobias Adamson Newbie

                  Are you using Embedded Tomcat or JBoss?
                  I'm using Tomcat with the Embedded Container and it works very well.

                  This is my config

                  Web.xml (including tomahawk code)
                  Notice that I'am using the nekohtml based FastFilter for Ajax4Jsf
                  This means that you need to download NekoHtml from http://java-source.net/open-source/html-parsers/nekohtml
                  and probably Xerces

                  <?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">
                  
                   <!-- Seam -->
                  
                   <listener>
                   <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                   </listener>
                  
                   <!-- JSF -->
                   <context-param>
                   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                   <param-value>client</param-value>
                   </context-param>
                  
                   <context-param>
                   <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                   <param-value>.html</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/tomahawk.taglib.xml</param-value>
                   </context-param>
                  
                   <context-param>
                   <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
                   <param-value>50</param-value>
                   </context-param>
                  
                   <servlet>
                   <servlet-name>Faces Servlet</servlet-name>
                   <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                   <load-on-startup>1</load-on-startup>
                   </servlet>
                  
                   <!-- Faces Servlet Mapping -->
                  
                   <servlet-mapping>
                   <servlet-name>Faces Servlet</servlet-name>
                   <url-pattern>*.jsf</url-pattern>
                   </servlet-mapping>
                  
                   <servlet>
                   <servlet-name>Seam Remoting</servlet-name>
                   <servlet-class>org.jboss.seam.remoting.SeamRemotingServlet</servlet-class>
                   </servlet>
                  
                   <servlet-mapping>
                   <servlet-name>Seam Remoting</servlet-name>
                   <url-pattern>/seam/remoting/*</url-pattern>
                   </servlet-mapping>
                  
                   <!-- Seam filters -->
                   <!-- Ajax4JSF Initial parameters -->
                   <filter>
                   <display-name>Ajax4jsf Filter</display-name>
                   <filter-name>ajax4jsf</filter-name>
                   <filter-class>org.ajax4jsf.FastFilter</filter-class>
                   </filter>
                   <filter-mapping>
                   <filter-name>ajax4jsf</filter-name>
                   <url-pattern>*.jsf</url-pattern>
                   </filter-mapping>
                   <filter-mapping>
                   <filter-name>ajax4jsf</filter-name>
                   <url-pattern>/faces/*</url-pattern>
                   </filter-mapping>
                  
                   <context-param>
                   <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                   <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                   </context-param>
                   <context-param>
                   <param-name>org.ajax4jsf.Filter</param-name>
                   <param-value>org.ajax4jsf.FastFilter</param-value>
                   </context-param>
                  
                  
                  
                   <!-- Propagate conversations across redirects -->
                   <filter>
                   <filter-name>Seam Redirect Filter</filter-name>
                   <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
                   </filter>
                  
                   <filter-mapping>
                   <filter-name>Seam Redirect Filter</filter-name>
                   <url-pattern>*.jsf</url-pattern>
                   </filter-mapping>
                  
                   <filter>
                   <filter-name>Seam Servlet Filter</filter-name>
                   <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class>
                   </filter>
                  
                   <filter-mapping>
                   <filter-name>Seam Servlet Filter</filter-name>
                   <url-pattern>/servlets/*</url-pattern>
                   </filter-mapping>
                  
                   <!-- MyFaces -->
                   <listener>
                   <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                   </listener>
                  
                   <filter>
                   <filter-name>ExtensionsFilter</filter-name>
                   <filter-class>
                   org.apache.myfaces.component.html.util.ExtensionsFilter
                   </filter-class>
                   <init-param>
                   <param-name>uploadMaxFileSize</param-name>
                   <param-value>10m</param-value>
                   </init-param>
                   <init-param>
                   <param-name>uploadThresholdSize</param-name>
                   <param-value>100k</param-value>
                   </init-param>
                   </filter>
                   <filter-mapping>
                   <filter-name>ExtensionsFilter</filter-name>
                   <servlet-name>Faces Servlet</servlet-name>
                   </filter-mapping>
                   <filter-mapping>
                   <filter-name>ExtensionsFilter</filter-name>
                   <url-pattern>*.jsf</url-pattern>
                   </filter-mapping>
                   <filter-mapping>
                   <filter-name>ExtensionsFilter</filter-name>
                   <url-pattern>/faces/*</url-pattern>
                   </filter-mapping>
                  </web-app>
                  


                  faces-config.xml
                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE faces-config
                   PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                   "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
                  
                  <faces-config>
                  
                   <converter>
                   <converter-id>org.joda.ext.jsf.converter.DateTime</converter-id>
                   <converter-class>org.joda.ext.jsf.converter.DateTimeConverter</converter-class>
                   </converter>
                  
                   <lifecycle>
                   <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
                   </lifecycle>
                  
                  </faces-config>
                  


                  tomahawk.taglib.xml
                  <?xml version="1.0"?>
                  <!DOCTYPE facelet-taglib PUBLIC
                   "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
                   "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
                  
                  <facelet-taglib>
                   <namespace>http://myfaces.apache.org/tomahawk</namespace>
                   <tag>
                   <tag-name>aliasBean</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.AliasBean</component-type>
                   <renderer-type>org.apache.myfaces.AliasBean</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>buffer</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.Buffer</component-type>
                   <renderer-type>org.apache.myfaces.Buffer</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>checkbox</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlCheckbox</component-type>
                   <renderer-type>org.apache.myfaces.Checkbox</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlCheckboxTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>collapsiblePanel</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlCollapsiblePanel</component-type>
                   <renderer-type>org.apache.myfaces.CollapsiblePanel</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlCollapsiblePanelTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>column</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlColumn</component-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>columns</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlColumns</component-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>commandButton</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlCommandButton</component-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>commandLink</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlCommandLink</component-type>
                   <renderer-type>org.apache.myfaces.Link</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>commandNavigation</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlCommandNavigation</component-type>
                   <renderer-type>javax.faces.Link</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>commandSortHeader</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlCommandSortHeader</component-type>
                   <renderer-type>org.apache.myfaces.SortHeader</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlCommandSortHeaderTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>dataList</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlDataList</component-type>
                   <renderer-type>org.apache.myfaces.List</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlDataListTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>dataScroller</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlDataScroller</component-type>
                   <renderer-type>org.apache.myfaces.DataScroller</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlDataScrollerTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>dataTable</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlDataTable</component-type>
                   <renderer-type>org.apache.myfaces.Table</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlDataTableTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>date</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputDate</component-type>
                   <renderer-type>org.apache.myfaces.Date</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>div</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.Div</component-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>graphicImage</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlGraphicImage</component-type>
                   <renderer-type>org.apache.myfaces.Image</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>htmlTag</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlTag</component-type>
                   <renderer-type>org.apache.myfaces.HtmlTagRenderer</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputCalendar</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputCalendar</component-type>
                   <renderer-type>org.apache.myfaces.Calendar</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlInputCalendarTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputDate</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputDate</component-type>
                   <renderer-type>org.apache.myfaces.Date</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputFileUpload</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputFileUpload</component-type>
                   <renderer-type>org.apache.myfaces.FileUpload</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlInputFileUploadTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputHidden</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputHidden</component-type>
                   <renderer-type>javax.faces.Hidden</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputHtml</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.InputHtml</component-type>
                   <renderer-type>org.apache.myfaces.InputHtml</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputSecret</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputSecret</component-type>
                   <renderer-type>org.apache.myfaces.Secret</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlInputSecretTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputText</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputText</component-type>
                   <renderer-type>org.apache.myfaces.Text</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlInputTextTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputTextarea</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputTextarea</component-type>
                   <renderer-type>org.apache.myfaces.Textarea</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlInputTextareaTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>inputTextHelp</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlInputTextHelp</component-type>
                   <renderer-type>org.apache.myfaces.TextHelp</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlInputTextHelpTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>jscookMenu</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.JSCookMenu</component-type>
                   <renderer-type>org.apache.myfaces.JSCookMenu</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>jsValueChangeListener</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.JsValueChangeListener</component-type>
                   <renderer-type>org.apache.myfaces.JsValueChangeListener</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>jsValueSet</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlJsValueSet</component-type>
                   <renderer-type>org.apache.myfaces.JsValueSet</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>layout</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlPanelLayout</component-type>
                   <renderer-type>org.apache.myfaces.Layout</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>message</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlMessage</component-type>
                   <renderer-type>org.apache.myfaces.Message</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>messages</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlMessages</component-type>
                   <renderer-type>org.apache.myfaces.Messages</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>navigationMenuItem</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.NavigationMenuItem</component-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlNavigationMenuItemTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>navigationMenuItems</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.NavigationMenuItem</component-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>newspaperTable</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlNewspaperTable</component-type>
                   <renderer-type>org.apache.myfaces.HtmlNewspaperTable</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>panelGrid</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlPanelGrid</component-type>
                   <renderer-type>javax.faces.Grid</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlPanelGridTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>panelGroup</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlPanelGroup</component-type>
                   <renderer-type>javax.faces.Group</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlPanelGroupTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>panelNavigation</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlPanelNavigation</component-type>
                   <renderer-type>org.apache.myfaces.Navigation</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>panelStack</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlPanelStack</component-type>
                   <renderer-type>org.apache.myfaces.PanelStack</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>panelTab</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlPanelTab</component-type>
                   <renderer-type>javax.faces.Group</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>panelTabbedPane</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlPanelTabbedPane</component-type>
                   <renderer-type>org.apache.myfaces.TabbedPane</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlPanelTabbedPaneTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>popup</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlPopup</component-type>
                   <renderer-type>org.apache.myfaces.Popup</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlPopupTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>radio</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlRadio</component-type>
                   <renderer-type>org.apache.myfaces.Radio</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlRadioTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>saveState</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.SaveState</component-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectBooleanCheckbox</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlSelectBooleanCheckbox</component-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlSelectBooleanCheckboxTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectManyCheckbox</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlSelectManyCheckbox</component-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlSelectManyCheckboxTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectManyListbox</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlSelectManyListbox</component-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlSelectManyListboxTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectManyMenu</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlSelectManyMenu</component-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlSelectManyMenuTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectOneCountry</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.SelectOneCountry</component-type>
                   <renderer-type>org.apache.myfaces.SelectOneCountry</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectOneLanguage</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.SelectOneLanguage</component-type>
                   <renderer-type>org.apache.myfaces.SelectOneLanguage</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectOneListbox</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlSelectOneListbox</component-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlSelectOneListboxTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectOneMenu</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlSelectOneMenu</component-type>
                   <renderer-type>org.apache.myfaces.Menu</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlSelectOneMenuTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>selectOneRadio</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.HtmlSelectOneRadioTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>stylesheet</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.Stylesheet</component-type>
                   <renderer-type>org.apache.myfaces.Stylesheet</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>swapImage</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlSwapImage</component-type>
                   <renderer-type>org.apache.myfaces.SwapImage</renderer-type>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>tree2</tag-name>
                   <component>
                   <component-type>org.apache.myfaces.HtmlTree2</component-type>
                   <renderer-type>org.apache.myfaces.HtmlTree2</renderer-type>
                   <handler-class>com.skalasoft.facelets.tags.generated.TreeTagHandler</handler-class>
                   </component>
                   </tag>
                   <tag>
                   <tag-name>validateCreditCard</tag-name>
                   <validator>
                   <validator-id>org.apache.myfaces.validator.CreditCard</validator-id>
                   </validator>
                   </tag>
                   <tag>
                   <tag-name>validateEmail</tag-name>
                   <validator>
                   <validator-id>org.apache.myfaces.validator.Email</validator-id>
                   </validator>
                   </tag>
                   <tag>
                   <tag-name>validateEqual</tag-name>
                   <validator>
                   <validator-id>org.apache.myfaces.validator.Equal</validator-id>
                   </validator>
                   </tag>
                   <tag>
                   <tag-name>validateRegExpr</tag-name>
                   <validator>
                   <validator-id>org.apache.myfaces.validator.RegExpr</validator-id>
                   </validator>
                   </tag>
                  </facelet-taglib>
                  


                  And then I import Ajax4Jsf into my page with

                  <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:s="http://jboss.com/products/seam/taglib"
                   xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
                   xmlns:t="http://myfaces.apache.org/tomahawk">
                  



                  If you have any more questions feel free to send me an email or ask here for everyones benefit.

                  Cheers
                  Tobias


                  • 6. Re: Ajax¤JSF with Seam
                    Gus Gu Expert

                    Hi Tobias,

                    Thank you so much for your very detailed guidance. I will try it again. I am currently using JBoss 4.0.4.GA and Seam 1.0.1.GA.

                    Best regards,

                    GUS

                    • 7. Re: Ajax¤JSF with Seam
                      Gus Gu Expert

                      I got a feedback from the Ajax4jsf developer as follows for the exception when using Ajax4jsf + Seam, maybe it is helpful for Seam integration with Ajax4jsf in future:

                      Date: Thu, 13 Jul 2006 10:29:56 +0400
                      From: Alexander Smirnov <asmirnov@exadel.com>
                      Content-Type: text/plain; charset=ISO-8859-1; format=flowed
                      Subject: Cannot run ajax4jsf on Seam


                      It's problem from JBOSS ClassLoader configuration - see
                      http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingOverview .
                      We use apache commons-degetester for got web application configuration
                      details, and this message mean that class for store filter
                      configuration can't be loaded by degitester. See Jboss wiki for possible
                      workaroutd, I thing that You must turn web-app classloading from
                      JBOSS-specific to JEE spec - see jboss-service.xml for embedded tomcat.
                      I will be made sample application and provide detail instructions.


                      The exception which I got is reposted again as below:
                      java.lang.ClassNotFoundException: No ClassLoaders found for: org.ajax4jsf.framework.util.config.FilterBean
                      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
                      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
                      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                      at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java :204)
                      .......

                      Thank you.

                      • 8. Re: Ajax¤JSF with Seam
                        Thomas Heute Master

                        I got it to work yesterday, and will provide an example in the codebase probably based on the booking store demo.

                        The simplest way is to put facelets and ajax4jsf libraries into server/default/deploy/jbossweb-xxx/jsf-libs
                        (Of course remove them from your war file)

                        • 9. Re: Ajax¤JSF with Seam
                          Gus Gu Expert

                          That is great! Thank you so much, Thomas.

                          • 10. Re: Ajax¤JSF with Seam
                            Gavin King Master

                             

                            The simplest way is to put facelets and ajax4jsf libraries into server/default/deploy/jbossweb-xxx/jsf-libs
                            (Of course remove them from your war file)


                            Unfortunately this approach is not good enough for the Seam examples packaging. All dependencies must go into the EAR.

                            • 11. Re: Ajax¤JSF with Seam
                              Thomas Heute Master

                              Yes, i proposed this as the simplest workaround.

                              • 12. Re: Ajax¤JSF with Seam
                                blalls asdsd Novice

                                I tried the guid line in this thread, but faced an exception

                                16:36:28,160 ERROR [PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) beforePhase.
                                javax.faces.el.EvaluationException: Cannot get value for expression '#{campusList==null}'
                                 at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
                                 at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1076)
                                 at org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeAjaxChild(AjaxContainerRenderer.java:160)
                                 at org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:126)
                                 at org.ajax4jsf.ajax.UIAjaxRegion.encodeAjax(UIAjaxRegion.java:224)
                                 at org.ajax4jsf.framework.renderer.AjaxRenderPhaseListener.renderAjaxRegion(AjaxRenderPhaseListener.java:306)
                                 at org.ajax4jsf.framework.renderer.AjaxRenderPhaseListener.processAjaxRender(AjaxRenderPhaseListener.java:252)
                                 at org.ajax4jsf.framework.renderer.AjaxRenderPhaseListener.beforePhase(AjaxRenderPhaseListener.java:229)
                                 at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
                                 at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
                                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:65)
                                 at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:226)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                                 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                                 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                                 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                                 at java.lang.Thread.run(Thread.java:595)
                                Caused by: java.lang.NullPointerException
                                 at org.jboss.seam.contexts.PageContext.getCurrentReadableMap(PageContext.java:62)
                                 at org.jboss.seam.contexts.PageContext.get(PageContext.java:52)
                                 at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:125)
                                 at org.jboss.seam.Component.getInstance(Component.java:1245)
                                 at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
                                 at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
                                 at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574)
                                 at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
                                 at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:154)
                                 at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
                                 ... 41 more
                                16:36:28,316 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
                                java.lang.NullPointerException
                                 at org.jboss.seam.contexts.PageContext.getCurrentWritableMap(PageContext.java:68)
                                 at org.jboss.seam.contexts.PageContext.remove(PageContext.java:79)
                                 at org.jboss.seam.core.Manager.discardTemporaryConversation(Manager.java:423)
                                 at org.jboss.seam.core.Manager.storeConversation(Manager.java:377)
                                 at org.jboss.seam.jsf.AbstractSeamPhaseListener.storeAnyConversationContext(AbstractSeamPhaseListener.java:69)
                                 at org.jboss.seam.jsf.SeamStateManager.saveSerializedView(SeamStateManager.java:45)
                                 at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:122)
                                 at org.apache.jsp.findCampus_jsp._jspx_meth_f_view_0(findCampus_jsp.java:192)
                                 at org.apache.jsp.findCampus_jsp._jspService(findCampus_jsp.java:126)
                                 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                                 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                                 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                                 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
                                 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
                                 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
                                 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
                                 at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
                                 at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
                                 at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
                                 at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
                                 at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
                                 at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
                                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:65)
                                 at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:226)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                                 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                                 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                                 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                                 at java.lang.Thread.run(Thread.java:595)
                                16:36:28,318 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
                                javax.servlet.ServletException: java.lang.NullPointerException
                                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:65)
                                 at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:226)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                                 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                                 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                                 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                                 at java.lang.Thread.run(Thread.java:595)
                                16:36:28,323 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
                                javax.faces.FacesException: java.lang.NullPointerException
                                 at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:439)
                                 at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
                                 at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
                                 at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
                                 at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
                                 at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
                                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:65)
                                 at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:226)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                                 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                                 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                                 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                                 at java.lang.Thread.run(Thread.java:595)
                                Caused by: java.lang.NullPointerException
                                 at org.jboss.seam.contexts.PageContext.getCurrentWritableMap(PageContext.java:68)
                                 at org.jboss.seam.contexts.PageContext.remove(PageContext.java:79)
                                 at org.jboss.seam.core.Manager.discardTemporaryConversation(Manager.java:423)
                                 at org.jboss.seam.core.Manager.storeConversation(Manager.java:377)
                                 at org.jboss.seam.jsf.AbstractSeamPhaseListener.storeAnyConversationContext(AbstractSeamPhaseListener.java:69)
                                 at org.jboss.seam.jsf.SeamStateManager.saveSerializedView(SeamStateManager.java:45)
                                 at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:122)
                                 at org.apache.jsp.findCampus_jsp._jspx_meth_f_view_0(findCampus_jsp.java:192)
                                 at org.apache.jsp.findCampus_jsp._jspService(findCampus_jsp.java:126)
                                 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                                 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                                 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                                 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
                                 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
                                 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
                                 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
                                 at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
                                 ... 37 more
                                



                                and my we.xml is :
                                <?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">
                                
                                <!-- Seam -->
                                
                                 <listener>
                                
                                 <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                                
                                 </listener>
                                
                                
                                 <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>*.jsf</url-pattern>
                                
                                 </servlet-mapping>
                                
                                
                                 <servlet>
                                
                                 <servlet-name>Seam Remoting</servlet-name>
                                
                                 <servlet-class>org.jboss.seam.remoting.SeamRemotingServlet</servlet-class>
                                
                                 </servlet>
                                
                                
                                
                                 <servlet-mapping>
                                
                                 <servlet-name>Seam Remoting</servlet-name>
                                
                                 <url-pattern>/seam/remoting/*</url-pattern>
                                
                                 </servlet-mapping>
                                
                                
                                <!-- Ajax4JSF Initial parameters -->
                                
                                 <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>
                                
                                 <url-pattern>*.jsf</url-pattern>
                                
                                 </filter-mapping>
                                
                                 <filter-mapping>
                                
                                 <filter-name>ajax4jsf</filter-name>
                                
                                 <url-pattern>/faces/*</url-pattern>
                                
                                 </filter-mapping>
                                
                                 <context-param>
                                
                                 <param-name>org.ajax4jsf.Filter</param-name>
                                
                                 <param-value>org.ajax4jsf.FastFilter</param-value>
                                
                                 </context-param>
                                
                                
                                 <!-- Propagate conversations across redirects -->
                                
                                 <filter>
                                
                                 <filter-name>Seam Redirect Filter</filter-name>
                                
                                
                                
                                <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
                                
                                 </filter>
                                
                                
                                
                                 <filter-mapping>
                                
                                 <filter-name>Seam Redirect Filter</filter-name>
                                
                                 <url-pattern>*.jsf</url-pattern>
                                
                                 </filter-mapping>
                                
                                
                                
                                
                                 <filter>
                                
                                 <filter-name>Seam Servlet Filter</filter-name>
                                
                                
                                
                                <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class>
                                
                                 </filter>
                                
                                
                                
                                 <filter-mapping>
                                
                                 <filter-name>Seam Servlet Filter</filter-name>
                                
                                 <url-pattern>/servlets/*</url-pattern>
                                
                                 </filter-mapping>
                                
                                
                                <!-- MyFaces -->
                                
                                 <listener>
                                
                                 <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                                
                                 </listener>
                                
                                 <context-param>
                                
                                 <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                                
                                 <param-value>client</param-value>
                                
                                 </context-param>
                                
                                
                                
                                
                                 <filter>
                                
                                 <filter-name>MyFacesExtensionsFilter</filter-name>
                                
                                 <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
                                
                                 <init-param>
                                
                                 <param-name>maxFileSize</param-name>
                                
                                 <param-value>20m</param-value>
                                
                                 <description>Set the size limit for uploaded files.
                                
                                 Format: 10 - 10 bytes
                                
                                 10k - 10 KB
                                
                                 10m - 10 MB
                                
                                 1g - 1 GB
                                
                                 </description>
                                
                                 </init-param>
                                
                                </filter>
                                
                                
                                
                                <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
                                
                                <filter-mapping>
                                
                                 <filter-name>MyFacesExtensionsFilter</filter-name>
                                
                                 <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
                                
                                 <servlet-name>Faces Servlet</servlet-name>
                                
                                </filter-mapping>
                                
                                
                                
                                <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
                                
                                <filter-mapping>
                                
                                 <filter-name>MyFacesExtensionsFilter</filter-name>
                                
                                 <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
                                
                                </filter-mapping>
                                
                                
                                
                                
                                
                                 <filter>
                                
                                 <filter-name>Seam Exception Filter</filter-name>
                                
                                 <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
                                
                                 </filter>
                                
                                 <filter-mapping>
                                
                                 <filter-name>Seam Exception Filter</filter-name>
                                
                                 <url-pattern>*.jsf</url-pattern>
                                
                                 </filter-mapping>
                                
                                
                                </web-app>
                                
                                


                                and finally the page is :

                                
                                 <a4j:region selfRendered="true" id="region">
                                 <div class="rvgResults">
                                
                                
                                
                                 <span class="rvgResultsNone">
                                
                                 <h:outputText value="#{msg.EnterSearchCriteria}" rendered="#{campusList==null}"/>
                                
                                 <h:outputText value="#{msg.No} #{msg.Campus} #{msg.MatchedSearchCriteria}" rendered="#{campusList.rowCount==0 && !campusFinder.previousPage}"/>
                                
                                 </span>
                                
                                
                                
                                 <h:dataTable id="dup" value="#{campusList}" var="campus" rendered="#{campusList.rowCount>0}"
                                 rowClasses="dvdtableodd,dvdtableeven" headerClass="dvdtablehead">
                                
                                
                                
                                 <h:column>
                                
                                 <f:facet name="header">
                                
                                 <h:commandLink value="#{msg.Campus_campusId}" action="#{campusFinder.reorder}">
                                
                                 <f:param name="orderBy" value="campusId"/>
                                
                                 </h:commandLink>
                                
                                 </f:facet>
                                
                                 <h:outputText value="#{campus.campusId}"/>
                                
                                 </h:column>
                                
                                 <h:column>
                                
                                 <f:facet name="header">
                                
                                 <h:commandLink value="#{msg.Campus_name}" action="#{campusFinder.reorder}">
                                
                                 <f:param name="orderBy" value="name"/>
                                
                                 </h:commandLink>
                                
                                 </f:facet>
                                
                                 <h:outputText value="#{campus.name}"/>
                                
                                 </h:column>
                                
                                 <h:column>
                                
                                 <f:facet name="header">
                                
                                 <h:commandLink value="#{msg.Campus_displayExecutiveReportBool}" action="#{campusFinder.reorder}">
                                
                                 <f:param name="orderBy" value="displayExecutiveReportBool"/>
                                
                                 </h:commandLink>
                                
                                 </f:facet>
                                
                                 <h:outputText value="#{campus.displayExecutiveReportBool}"/>
                                
                                 </h:column>
                                
                                 <h:column>
                                
                                 <f:facet name="header"><h:outputText value="#{msg.Action}"/></f:facet>
                                
                                 <h:commandButton action="#{campusSelector.select}" value="#{campusSelector.buttonLabel}"/>
                                
                                 </h:column>
                                
                                 </h:dataTable>
                                
                                 <a4j:commandButton action="#{campusFinder.findNextPage}" value="Ajax Submit Button" disabled="#{!campusFinder.nextPage}" />
                                </a4j:region>
                                


                                • 13. Re: Ajax¤JSF with Seam
                                  francesco milesi Newbie

                                  Hi everybody,

                                  I am using jboss-4.0.5 and jboss-seam-1.1.0.CR1.
                                  I have tried to use ajax4jsf in an application generated by reverse-engeneering.
                                  I have followed the instructions I read in paragraph "14.2. Configure Ajax4jsf" of "JBoss Seam: Simplicity and Power Beyond Java EE 5.0":

                                  1. I put the following xml in web.xml

                                  <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>
                                  <dispatcher>INCLUDE</dispatcher>
                                  </filter-mapping>
                                  <context-param>
                                  <param-name>
                                  org.ajax4jsf.VIEW_HANDLERS
                                  </param-name>
                                  <param-value>
                                  com.sun.facelets.FaceletViewHandler
                                  </param-value>
                                  </context-param>
                                  



                                  2. In faces-config.xml I commented

                                  <view-handler>
                                  com.sun.facelets.FaceletViewHandler
                                  </view-handler>
                                  



                                  3. I put META-INF ajax4jsf.jar, oscache-2.3.2.jar, el-api.jar, el-ri.jar, jsf-facelets.jar in <my-app>.jar of my <my-app>.ear


                                  Finally I have replaced

                                  <h:commandButton id="update" value="Save"
                                   action="#{usersHome.update}"
                                   rendered="#{usersHome.managed}"/>
                                  

                                  with

                                  <a4j:commandButton type="submit" value="Save"
                                   reRender="description"
                                   action="#{usersHome.update}"
                                   rendered="#{usersHome.managed}" />


                                  in my .xhtml page.

                                  I get the following error:

                                  javax.el.PropertyNotFoundException: Bean: it.severn.data.UsersHome$$EnhancerByCGLIB$$54529d2b, property: update
                                  at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:146)
                                  at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
                                  at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
                                  at com.sun.facelets.el.ELText$ELTextVariable.toString(ELText.java:174)

                                  Notice that I checked my deployment many times and it conforms to the previous instructions and that #{usersHome.update} is not a property, but an action.
                                  A previous post (describing a very similar problem, but non explaining the solution) says that
                                  Facelets when not finding a tag library instead of putting up an ugly error message ingnores it and instead tries to evaluate the EL as a property access.

                                  Does that means that Facelets do not find a4j tags? With seam tags everything is ok, of course.
                                  Could anyone help me to find out where I am wrong ?

                                  Thanks in advance Francesco




                                  • 14. Re: Ajax¤JSF with Seam
                                    francesco milesi Newbie

                                    I found that the booking example in seam1.1 is using ajax4jsf.
                                    I'll try that, before bothering you again.

                                    Thanks Francesco

                                    1 2 Previous Next