4 Replies Latest reply on Sep 19, 2008 7:45 AM by matinh

    rich Ordering List Property not found on form submission

      Hi all,
      I am using rich-faces 3.2.0.SR1 and have been trying to implement the rich:orderingList component for the first time.

      
       <rich:orderingList
       id="BookingResidences" value="#{backingBean.listObject}" var="obj" listHeight="300" listWidth="350"
       >
       <rich:column width="180">
       <f:facet name="header">
       <h:outputText value="Object Name" />
       </f:facet>
       <h:outputText value="#{obj.name}"/>
       </rich:column>
      
       </rich:orderingList>
      
      



      The "listObject" is a LinkedList ( of User) and is constructed as per a previously selected value. The component is rendered correctly but when the form is submitted, I am getting a strange error as follows:

      Property 'name' not found on type org.demo.models.User
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
       org.cbs.housing.auth.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:41)
      
      
      




      Can anyone help me through this.


      Regards,

      JANKEE Yogesh
      M-ITC LTD

        • 1. Re: rich Ordering List Property not found on form submission
          ilya_shaikovsky

          both ordering list and list shuttle requires converter for objects to be specified. Also objects for these components should have equals and hashCode methods implemented.

          check livedemo example. List shuttle component. there is submission of List Shuttle changes implemented

          • 2. Re: rich Ordering List Property not found on form submission

            Hi,
            Thnx for your quick reply. I could not find the source code for the Converter on the livedemo site ( http://livedemo.exadel.com/richfaces-demo/richfaces/listShuttle.jsf?c=listShuttle).

            Any hints where i can find this ? Thnx heaps ;0)


            Cheers,
            JANKEE Yogesh
            M-ITC LTD

            • 3. Re: rich Ordering List Property not found on form submission
              zbandersnatch

              Try:

              http://lists.jboss.org/pipermail/richfaces-svn-commits/2007-December/004425.html

              For some reason, there's not a lot of backing bean code available on the demo site. The only way I've been able to find it is to google for class or method names you see within the JSF code on the demo site.

              In this instance, the example code for orderingList isn't much help, but the code for listShuttle contains:

               <rich:listShuttle sourceValue="#{toolBar.freeItems}"
              
               targetValue="#{toolBar.items}" var="items" listHeight="300"
              
               listWidth="300" sourceCaptionLabel="Available Items"
              
               targetCaptionLabel="Currently Active Items"
              
               converter="listShuttleconverter">
              


              I googled for "listShuttleConverter" and happened to find the code for orderingListConverter in the same Subversion commit.

              I'm really not sure why the committers working on the demo site chose not to make the backing bean source available for most of the examples, but from my own (limited) experience you'll have to get out the ol' deerstalker cap and pipe to find it. From looking at other posts on this forum, it's typical that you won't get a response if you ask.

              RichFaces is a great product, but like a lot of other community-based Java tools its most severe deficiency is half-assed documentation.

              • 4. Re: rich Ordering List Property not found on form submission
                matinh

                Hi!

                Just for the records: orderingList does not yet support generic Lists, so you either have to use Arrays, or you explicitly specify the converter as an attribute of the orderingList tag.

                If you specify your converter via faces-config.xml for all objects of the this type, using lists is not possible! You'll get the same PropertyNotFoundException.

                hth,
                - martin