10 Replies Latest reply on Feb 1, 2008 12:39 PM by Anne Chou

    @DataModel not working with scrollableDataGrid

    Matthew Lieder Apprentice

       

      <rich:scrollableDataTable id="staffList" var="staff" value="#{availableStaff}">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Name" />
       </f:facet>
       <h:outputText value="#{staff.fullName}" />
       </rich:column>
       </rich:scrollableDataTable>


       ...
       @DataModel private List<Staff> availableStaff;
       ...
       @Factory(value="availableStaff")
       public void initAvailableStaff() {
       ...
       }


      javax.faces.FacesException: javax.el.PropertyNotFoundException: /viewStaff.xhtml @152,49 value="#{staff.fullName}":
      The class 'org.jboss.seam.jsf.ListDataModel' does not have the property 'fullName'.
       at javax.faces.component.UIOutput.getValue(UIOutput.java:176)
       at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer$6.renderContent(ScrollableDataTableBaseRenderer.java:247)
       at org.richfaces.renderkit.html.ExtendedColumnVisitor.visit(ExtendedColumnVisitor.java:31)
       at org.richfaces.renderkit.html.ColumnWalker.iterateOverColumns(ColumnWalker.java:42)
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer$7.process(ScrollableDataTableBaseRenderer.java:289)
       at org.richfaces.model.ScrollableTableDataModel.walk(ScrollableTableDataModel.java:129)
       at org.richfaces.model.DataModelCache.walk(DataModelCache.java:183)
       at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:968)
       at org.richfaces.component.UIScrollableDataTable.walk(UIScrollableDataTable.java:329)
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.renderGridBody(ScrollableDataTableBaseRenderer.java:459)
       at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(ScrollableDataTableRenderer.java:394)
       at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(ScrollableDataTableRenderer.java:553)
       at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135)
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.encodeEnd(ScrollableDataTableBaseRenderer.java:746)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
       at org.richfaces.component.UIScrollableDataTable.encodeEnd(UIScrollableDataTable.java:335)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896)
       at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.ModalPanelRenderer.doEncodeChildren(ModalPanelRenderer.java:351)
       at org.richfaces.renderkit.html.ModalPanelRenderer.doEncodeChildren(ModalPanelRenderer.java:346)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       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:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at com.fl.nuevo.utils.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:42)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.el.PropertyNotFoundException: /viewStaff.xhtml @152,49 value="#{staff.fullName}":
      The class 'org.jboss.seam.jsf.ListDataModel' does not have the property 'fullName'.
       at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
       at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
       ... 74 more


      If I switch from scrollableDataGrid to dataGrid, it works fine. It could be that scrollableDataGrid requires its own special DataModel implementation?