right... i'm having another try at upgrading to seam 2.0.0CR1!
I've narrowed the problem down to being something to with the RichFaces
integration. Specifically, the RichFaces tab panel doesn't seem to be able to
access Seam components through the EL. I've changed the RichFaces jar files to
the 3.1.1 snapshot release and it is displaying the RichFaces tab panel
correctly - it's just getting hold of seam components that is failing. This is
giving the 'In attribute requires non-null value' error.
The xhtml file snippet is:
| <h:form class="homepage" id="homepageform" enctype="multipart/form-data">
|
| <h:inputText value="#{userView.selectedTab}" id="selectedTab"/>
|
| <rich:tabPanel switchType="client" selectedTab="#{userView.selectedTab}">
|
| ...
|
The standard jsf inputText component above the tab panel picks up the
#{userView.selectedTab} fine, and if I put debug output in the selectedTab
getter for the userView bean I can see it is being called without any problems
by the jsf widget. But with the richfaces tab panel i get this stack trace:
| 15:28:18,282 admin WARN [lifecycle] executePhase(RESTORE_VIEW 1,[EMAIL
PROTECTED]) threw exception
| javax.faces.FacesException: javax.el.ELException: /admin/adminhome.xhtml
@25,78 selectedTab="#{userView.selectedTab}": Error reading 'selectedTab' on
type org.javassist.tmp.java.lang.Object_$$_javassist_3
| at javax.faces.component.UIOutput.getValue(UIOutput.java:176)
| at org.richfaces.component.UITabPanel.getValue(UITabPanel.java:70)
| at
org.richfaces.component.UITabPanel.getRenderedValue(UITabPanel.java:96)
| at
org.richfaces.component.UITabPanel.restoreState(UITabPanel.java:119)
| at
org.richfaces.component.html.HtmlTabPanel.restoreState(HtmlTabPanel.java:985)
| at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1138)
| at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1154)
| at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1154)
| at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1154)
| at
org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:245)
| at
com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:287)
| at
org.jboss.seam.jsf.SeamViewHandler.restoreView(SeamViewHandler.java:93)
| at
com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
| at
org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
| at
org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
| at
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
| at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
|
| <snip>
|
| Caused by: org.jboss.seam.RequiredException: In attribute requires non-null
value: userView.entityController
| at org.jboss.seam.Component.getValueToInject(Component.java:2169)
| at org.jboss.seam.Component.injectAttributes(Component.java:1599)
| at org.jboss.seam.Component.inject(Component.java:1417)
| at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at
org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at
org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at
org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor1494.invoke(Unknown Source)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
| at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| ... 96 more
|
|
|
It seems to be complaining about the injected EntityController object, which
gets created fine everywhere else it is accessed apart from in this tabpanel.
This is how i inject it:
| @In(create=true)
| private EntityController ec;
|
Do I need to change anything in my web.xml maybe for this release? I currently
have:
| <!-- Ajax4jsf -->
| <context-param>
| <param-name>org.richfaces.SKIN</param-name>
| <param-value>blueSky</param-value>
| </context-param>
|
| <context-param>
| <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
| <param-value>com.sun.facelets.FaceletViewHandler</param-value>
| </context-param>
|
| <!-- Seam -->
|
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <filter>
| <filter-name>Seam Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
| <servlet>
| <servlet-name>Seam Resource Servlet</servlet-name>
|
<servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <url-pattern>/seam/resource/*</url-pattern>
| </servlet-mapping>
|
| ...
|
|
I looked at the seam-examples for seamdiscs, which has richfaces integrated,
and there is no richfaces filter defined in the web.xml - just a comment to say
it is now handled by the seam filter, so I took the richfaces filter part out.
The tab panel renders ok if I put a static value in like
<rich:tabPanel switchType="client" selectedTab="homePage">
and I can access seam components through other widgets, it's just the two
things together that don't seem to play nicely!
so has anyone got any bright ideas about this one? any help at all would be
greatly appreciated! :)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088888#4088888
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088888
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user