2 Replies Latest reply on Nov 28, 2012 7:27 AM by thex

    How can i simulate click on richfaces tree node?

    thex

      Hello.

      I write tests on Telerik WebAii and it cant click on root node with native events.

      Please help me how i can do it. Maybe with JS? or smth else?

        • 1. Re: How can i simulate click on richfaces tree node?
          iabughosh

          welcome to the communtiy Anton,

          you can make treeNode performs an action :

          ...

          <rich:treeNode onclick="performAction()"/>

          ...

           

          <a4j:jsFunction name="performAction" action="#{yourBean.doAnAction}"/>

           

          regards.

          • 2. Re: How can i simulate click on richfaces tree node?
            thex

            Thanks Ibrahim,

            I found solution few minutes ago

             

             

            var $el = $(selector);

             

            var offset = $el.offset();

             

            var event = $.extend( $.Event( "mousedown" ), {

             

                                                            which: 1,

             

                                                            pageX: offset.left,

             

                                                            pageY: offset.top

             

                                                    });

             

            $el.trigger(event);