[jboss-user] [JBoss Seam] - Argh! Attribute access

texan do-not-reply at jboss.com
Mon Aug 28 12:31:12 EDT 2006


I have some attributes on my session bean, accessible via the local interface with getters and setters.

For example:

public int getPageSize();
  | public void setPageSize(int size);

I tried moving these to an Outjected named bean (session scope) and I got "NumberFormatException" when rendering the JSF component in my facelet:

@Out private TableDataList page;

<h:inputText id="pageSize" value="#{page.pageSize}" />

I then tried making the "page" bean accessible via getters and setters on the session bean:

public TableDataList getPage();

and changed the JSF code to:

<h:inputText id="pageSize" value="#{alertSession.page.pageSize}" />

Ack - still getting the NumberFormatException.  There is literally no difference in the getPageSize() and setPageSize() methods on the session bean vs the page bean.  Any ideas?

Here's the stack trace:


  | 
  | [/coERROR {STDERR} LoggerStream.write - Aug 28, 2006 10:21:28 AM com.sun.facelets.FaceletViewHandler handleRenderException
  | SEVERE: Error Rendering View[/Alerts.xhtml]
  | javax.el.ELException: /Alerts.xhtml: For input string: "pageSize"
  | 	at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:50)
  | 	at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
  | 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:232)
  | 	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.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.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.NumberFormatException: For input string: "pageSize"
  | 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
  | 	at java.lang.Integer.parseInt(Integer.java:447)
  | 	at java.lang.Integer.parseInt(Integer.java:497)
  | 	at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:138)
  | 	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.writeText(ELText.java:184)
  | 	at com.sun.facelets.el.ELText$ELTextComposite.writeText(ELText.java:108)
  | 	at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:45)
  | 	... 28 more
  | de]

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

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



More information about the jboss-user mailing list