[jboss-user] [JBoss Seam] - Re: Ajax¤JSF with Seam

milesif do-not-reply at jboss.com
Wed Dec 6 13:18:49 EST 2006


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 anonymous wrote : 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




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

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



More information about the jboss-user mailing list