1 Reply Latest reply on Jun 24, 2009 5:14 AM by Nick Belaevski

    rich:datatable and rich:tree

    Ioana Iacob Newbie


      I have two questions, regarding two different rich components:

      1. I wanted to define my own style for the rich datatable, and I was successful, except, the table header, which has the right color, but on mouse over the background disappears, which is very undesired.

      2. The rich:tree... I want to make only the leaf nodes selectable, plus I would like to make the tree expand not only by clicking the icon, but also the description of the node. Anyway.. I tried using a nodeselectionlistener:

      public void processTreeNodeImplSelection(final NodeSelectedEvent event) {
       HtmlTree tree = (HtmlTree) event.getComponent();
       String nodeTitle = (String) tree.getRowData();
       TreeNode<String> currentNode = tree.getModelTreeNode(tree.getRowKey());
       if (currentNode.isLeaf()){
       System.out.println("Node selected : " +(String)currentNode.getData());

      This works if I select only the leaf node, if I click on a parent node first, then I don't get the system.out anymore, no matter how many times I click on the leaf node. Another thing is that I would like to get the nodes from db, and on selecting a leaf node, display some information (something more complex than the description, like in the exmple on the livedemo).

      I would also like to mention that I am using RichFaces 3.3.0, jboss 4.2.3.GA, and the beans have session scope.

      Thank you,