[jboss-user] [JBoss Seam] - PropertyNotFoundException with basic call to method

christian_zeidler do-not-reply at jboss.com
Sun Jan 21 10:22:32 EST 2007


Hello,

I'm quite new to Seam and am encountering a problem that must be rather easy to solve ... I think, or hope...

I'm trying to show/ hide elements on the navigation menu based on whether the user is logged in or not (as in the dvd-store example).

Here is the code from the nav-menu:

  | <f:subview rendered="#{login.test}">
  |    <li id="page_hidden"><s:link view="/hidden.xhtml" value="Hidden" propagation="none"/></li>
  | </f:subview>
  | 

Now for all simplicity, my LoginBean class contains the method test() wich simply returns true:

  | public boolean test(){
  |     	return true;
  |     }
  | 

and the interface defines that method:

  | @Local
  | public interface Login {  
  | 
  |     public String login();  
  |     public String getUserName();
  |     public void setUserName(String username); 
  |     public boolean test();
  | }
  | 

OK, so now here is the exception that I get when calling any page that uses tha menu:

  | javax.faces.el.PropertyNotFoundException: /layout/nav.xhtml @9,45 rendered="#{login.test}": Bean: christian.navtest.Login$$EnhancerByCGLIB$$9bac42c3, property: test
  | 	at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:58)
  | 	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1075)
  | 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:231)
  | 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
  | 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
  | 	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.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
  | 	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:46)
  | 	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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	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)
  | 

Thank you for your help! 
(If you need more information please let me know)

- Christian

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

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



More information about the jboss-user mailing list