0 Replies Latest reply on Jul 31, 2008 5:24 PM by ganix

    Orderinglist and JBoss5.0.0.CR1 Seam 2.0.3.CR1

    ganix Newbie

      Hi,

      i have seam .xhtml page with a orderinglist like this:

      <rich:orderingList id="list" value="#{clItems}" var="cli" >
       <rich:column>
       <f:facet name="header">
       <h:outputText value="value (%)" />
       </f:facet>
       <h:outputText value="#{cli.value}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value="time (ms)" />
       </f:facet>
       <h:outputText value="#{cli.time}" />
       </rich:column>
      </rich:orderingList>
      


      There are two problems with this constellation.
      Using a Vector of a pojo with properties time and value, the list is rendered correctly the first time, but when i post the surrounding form, the item is suddenly of type String, an there is an Exception that .value is not a property of String. Using String only items is not sufficient for the application. there have to be 2 colums with individual properties.

      So i use a entitybean as item class, and create a factory in the backingbean that creates the List<> of items and annotyte the list with @DataModel.
      Very much the same as shown in the examples.
      I tried the backing bean and the entity with a datatable component in the .xhtml page, and it works as expected.
      But when using the above mentioned orderinglist, i have the following exception:

      Error Rendering View[/editor2.xhtml]
      java.lang.IllegalArgumentException
       at org.richfaces.component.UIOrderingBaseComponent.createDataModel(UIOrderingBaseComponent.java:193)
       at org.richfaces.component.UIOrderingList.createDataModel(UIOrderingList.java:140)
       at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:592)
       at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:994)
       at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:107)
       at org.richfaces.renderkit.OrderingListRendererBase.encodeRows(OrderingListRendererBase.java:111)
       at org.richfaces.renderkit.AbstractRowsRenderer.encodeChildren(AbstractRowsRenderer.java:139)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:284)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
       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:109)
       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
       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:45)
       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:158)
       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)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Unknown Source)