3 Replies Latest reply on May 2, 2011 4:14 PM by nbelaevski

    TagException with recursiveTreeNodesAdaptor/treeNodesAdaptor tags

    david03

      Hi,

       

      I am having problems when using recursiveTreeNodesAdaptor and treeNodesAdaptor in RichFaces 4.0. When I use them, I get a TagException:

       

       

      <rich:recursiveTreeNodesAdaptor> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: recursiveTreeNodesAdaptor

       

      I haven't problems when using rich:tree or other richfaces tags.

       

       

      Thanks in advanced.

        • 1. TagException with recursiveTreeNodesAdaptor/treeNodesAdaptor tags
          nbelaevski

          Hi David,

           

          Some tags were renamed in 4.x, this one is now called treeModelRecursiveAdaptor. Please take a look: docs.jboss.org/richfaces/latest_4_0_X/vdldoc/overview-summary.html

          • 2. TagException with recursiveTreeNodesAdaptor/treeNodesAdaptor tags
            david03

            Thanks Nick. I supposed it had something to do with tag renaming, but I didn't manage to find a solution.

             

            Regarding this tag, I have had look to several examples, such the official example for the tag, and examples for recursive tree nodes, among other examples found in blogs.

             

            The point is that I haven't succeeded to see how to manage nodes which their parent can be of one type or another one. This case can't be tackled with the bean structure provided for simple tree example, as one node can't have parents of different types.

             

            For example, taking into account the folder/files examples. I should have a list of nodes for the root folders. Then, a list of nodes for the rest of nodes.

            A folder can have two kind of children, folder(s) and file(s). How should I manage this case?

            On the other hand, which interface should the nodes implement so that tree component can retrieve the nodes? getChildren() getParent() methods?

            These methods should return a List structure of nodes?

            • 3. TagException with recursiveTreeNodesAdaptor/treeNodesAdaptor tags
              nbelaevski

              >> A folder can have two kind of children, folder(s) and file(s). How should I manage this case?

               

              The easiest is to create two separate attributes for files and folders and set two different adaptors to be used.

               

              >> On the other hand, which interface should the nodes implement so that tree component can retrieve the nodes?

              >> getChildren() getParent() methods?

               

              Adaptor tags do not require any particular interface. They are working by evaluating EL-expression that you define via tag attributes.