2 Replies Latest reply on Jul 11, 2012 1:16 AM by sivaprasad9394

    what is the purpose of rowKeyConverter

    ravuri.ravindrababu

      Hi All,

       

      Can any one explain me

      what is the purpose of rowKeyConverter?

      and How can we use rowKeyConverter in rich tree?

        • 1. Re: what is the purpose of rowKeyConverter
          rednose

          If the node of your tree are represented by custom objects in your Java code you may have to use a rowKeyConverter. For this you could extend TreeNodeImpl and override getChildrenKeysIterator().

          In order to handle user events RichFaces will have to identify the tree nodes and therefore creates an identification-String on the server to send it to the client and when the id comes back RichFaces must find the object for the tree node. As RichFaces does not know your custom object, it can just use toString().

          But you can implement a rowKeyConverter for the job of converting.

          • 2. Re: what is the purpose of rowKeyConverter
            sivaprasad9394

            use of rowKeyConvertor is like below and it works for the below components,

             

             

            rowKeyConverter="javax.faces.Long"

             

            tree

            extendedDataTable

            dataGrid

            dataList

            dataOrderedList

            dataDefinitionList

            dataTable

            subTable

             

            Convert for a row key object.It converts the entity to some String or some class.......

            Try look on the below link for help,

             

            https://community.jboss.org/message/551085

             

            Thanks,

            Siva