1 Reply Latest reply on Jul 9, 2009 7:02 AM by Ilya Shaikovsky

    Tree node center vertically?

    Derk Dukker Novice

      I use the rich tree in richfaces 3.1.6.SR1. I can't upgrade to a newer version because I'm stuck with JSF 1.1.

      When I open a page I walk through the tree and want to make the node (get the id from the GET parameter) selected I want to center the selected tree node vertically. So if the selected node is the last node in the tree and I have scroll bars in my browser window, I want the scroll bars to automatically scroll down to the selected node.

      Is this possible? If so how can I acomplish this?



        • 1. Re: Tree node center vertically?
          Ilya Shaikovsky Master

          probably you should use anchor in treeNode markup in order to focus it from javascript on window load if need.

          something like next code for input.

           <script type="text/javascript">
           window.onload = function(){#{rich:element('input')}.focus()};
           <h:inputText value="" id="input">