[jboss-user] [JBoss Seam] - Issue with JSF datatable with Seam Obj.

skr do-not-reply at jboss.com
Thu Sep 28 14:35:07 EDT 2006


Hi,
   I am using seam + JSF datatable, i am not able to use the value of datamodle in custom jsp tags. getting exception. here is my jsf table.
monitorAction is the seam action object name. monitorReviews is the collection. Is it required to bind the action (monitorAction) in datatable value? just monitorReviews is working fine. I tried with int and String for mReview.rating. with out custom tag, it was working fine.
Please help me how can i use custom tags in jsf page with seam obj's values. Please look at the exception below the code


<h:dataTable id="MTable" border="1" width="60%" value="#{monitorAction.monitorReviews}" var="mReview">
 <h:column>
  <f:facet name="header">
   <h:outputText value="Date"/>
  </f:facet>
  <h:outputText value="#{mReview.dateInFormat}"/>
 </h:column>
 <h:column>
  <f:facet name="header">
   <h:outputText value="Rating"/>
  </f:facet>
  <f:verbatim>
   <rr:ratingImage averagerating="#{mReview.rating}" descriptionNeeded="Y"/>
  </f:verbatim> 
</h:column>
 <h:column>
  <f:facet name="header">
   <h:outputText value="Subject"/>
  </f:facet>
  <h:outputText value="#{mReview.subject}"/>
  </h:column>
</h:dataTable>


Exception:

2006-09-28 11:11:30,474 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/admin].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NumberFormatException: For input string: "#{mReview.rating}"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
	at java.lang.Float.valueOf(Float.java:360)
	at org.apache.jasper.compiler.JspUtil.coerceToPrimitiveFloat(JspUtil.java:728)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.convertString(Generator.java:2945)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2752)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2858)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2176)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1685)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Generator.generate(Generator.java:3305)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
	at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	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)
2006-09-28 11:11:30,474 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/admin].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Unable to compile class for JSP
	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
	at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	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: org.apache.jasper.JasperException: Unable to compile class for JSP
	at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
	... 22 more

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

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



More information about the jboss-user mailing list