3 Replies Latest reply on May 12, 2011 2:03 AM by Tim Gottwald

    listShuttle with tree on left side

    Jeremy Goodell Newbie

      I need to create a listShuttle with a tree interface on the left side. The tree only has two levels, family and item. I need to use a tree instead of a simple list because there are too many items to put into the listShuttle without grouping them by family. I have looked at listShuttle and at Tree, but it's not obvious how to combine the two.

      Could someone give me a few simple pointers on how to get started creating this interface?


        • 1. Re: listShuttle with tree on left side
          Nick Belaevski Master

          Hi Jeremy,

          That's not possible out of the box.

          • 2. Re: listShuttle with tree on left side
            Jeremy Goodell Newbie

            Yes. I spent all day yesterday playing around with treeAdaptors and pickLists. It took me a while to figure out that a pickList cannot take a list of SelectItemGroups, like a selectOneMenu. At least, I think that's the case. I tried it, but the results were pretty odd.

            Soi, I am now attempting to build a tree panel with drag-n-drop capabilities into a list panel on the right. It's coming along okay, using the richfaces live demo code as a starting point.

            However, this is a very limited starting point. Can someone point me to some other samples or documentation that would help in this effort? For example, in the samples source, SimpleTreeDndBean includes code that calls getTreeModel(), but that call returns null in my case, and I cannot find any information about what the treeModel is.


            • 3. listShuttle with tree on left side
              Tim Gottwald Newbie

              I'm late but I have found a more or less simple way to do it.

              rich:tree and rich:listShuttle in h:panelGrid

              I put all available datas (in your case the families) in the source list of the list shuttle

              Hide the source list (sourceListWidth=0, .rich-shuttle-source-items { border:0px;  })

              Use the data in the list to build up the tree in your Bean

              Implement a selection listener for the tree to synchronize the selection of the tree with the hidden list


              Looks nice and works well.

              Greeting from Luxembourg, Tim