[jboss-user] [JBoss Seam] - Re: Ajax4JSF experiences

Jabberwocky do-not-reply at jboss.com
Tue Jul 18 01:49:24 EDT 2006


I've just make some tests with
Seam 1.0.1GA
ajax4jsf 1.0rc2
Facelets 1.1.11

It looks like working.


Echo Example: 
 #{bean} is  Seam stateful EJB

  | <ui:define name="body">
  | 		<a4j:status startText="Performing Request" startStyle="color:red"
  | 			stopStyle="color:green" stopText="Request Done" for="region" />
  | 
  | 		<a4j:region selfRendered="true" id="region">
  | 			<h:form id="inputForm">
  | 				<h:outputText value="Type the Text:" />
  | 				<h:inputText value="#{bean.text}" size="50">
  | 					<a4j:support event="onkeyup" reRender="repeater,repeater2" />
  | 				</h:inputText>
  | 			</h:form>
  | 
  | 			<h:form id="outputForm">
  | 				<h:outputText value="Text in the AJAX Response:" />
  | 				<h:outputText id="repeater" value="#{bean.text}" />
  | 				<h:inputText id="repeater2" value="#{bean.text}" />
  | 			</h:form>
  | 		</a4j:region>
  | 
  | 
  | 	</ui:define>
  | 
  | 

Another  test with  <h:inputText> and AJAX reRendered  <h:dataTable> is also working.

Here 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">
  |  
  | 
  |     
  |  <!--  ========Seam begin ========== -->
  |     <listener>
  |         <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  |     </listener>
  | <!--  ========Seam end ========== -->    
  | 
  |  
  | <!--  ======== AJAX4JSF begin ========== -->   
  | <context-param>
  |       <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
  |       <param-value>com.sun.facelets.FaceletViewHandler</param-value>
  | </context-param>     
  |        
  | <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>
  | <!--  ======== AJAX4JSF end ========== -->   
  | 
  |     
  |     
  | <!--  ========Facelets begin ========== -->
  |  	<context-param>
  | 		<param-name>facelets.REFRESH_PERIOD</param-name>
  | 		<param-value>2</param-value>
  | 	</context-param>
  | 
  |     <context-param>
  |         <param-name>facelets.DEVELOPMENT</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |     
  |     <context-param>
  | 		<param-name>facelets.SKIP_COMMENTS</param-name>
  | 		<param-value>true</param-value>
  | 	</context-param>	    
  | 
  | <!--  ========Facelets end ========== -->
  | 
  | 
  | <!--  ======== JSF begin ========== -->
  |     <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>.xhtml</param-value>
  |     </context-param>
  | 
  | <!-- 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>
  | 	
  | <!-- Faces Servlet Mapping -->
  | 	<servlet-mapping>
  | 		<servlet-name>Faces Servlet</servlet-name>
  | 		<url-pattern>*.jsf</url-pattern>
  | 	</servlet-mapping>
  | 	
  | 	
  | <!-- MyFaces -->
  |     <listener>
  |         <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  |     </listener>   
  |     
  | <!--  ======== JSF end ========== -->     
  |  </web-app>
  | 

in faces-config.xml  just seam, facelets view-handler declared in web.xml

  |  <lifecycle>
  | <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
  |  </lifecycle>
  | 

But I've got another problem. In some time after AJAX request WARN on console like this:

08:16:55,580 WARN  [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=cam-79/754, BranchQual=, localId=754] timed out. status=STATUS_ACTIVE

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958655#3958655

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958655



More information about the jboss-user mailing list