2 Replies Latest reply on Dec 15, 2010 12:37 PM by Lukáš Fryč

    RF4 - rich:tree - toggling modes and events

    Lukáš Fryč Master

      I have following problems with rich:tree:

       

      1. there are only one event handler for node toggling: @onnodetoggle - but it will be more useful to have also 2 separated event handlers @onnodeexpand, @onnodecollapse (incl. their onbefore- variants)
      2. The tree in @mode=ajax needs to be rendered from server, but I cannot imagine scenario where developer really needs to collapse the node and request this from server (request is needed only for expading) - as the solution I propose to introduce new mode ajax-expanding.
        • 1. Re: RF4 - rich:tree - toggling modes and events
          Nick Belaevski Master

          Hi Lukas,

          1. there are only one event handler for node toggling: @onnodetoggle - but it will be more useful to have also 2 separated event handlers @onnodeexpand, @onnodecollapse (incl. their onbefore- variants)

          We've discussed this with Ilya also and decided to leave a single attribute.

          1. The tree in @mode=ajax needs to be rendered from server, but I cannot imagine scenario where developer really needs to collapse the node and request this from server (request is needed only for expading) - as the solution I propose to introduce new mode ajax-expanding.

          This can be used to trigger server-side listeners. Anyway, we can add one more mode - please add JIRA RFC and we'll discuss. 

          • 2. Re: RF4 - rich:tree - toggling modes and events
            Lukáš Fryč Master
            2. The tree in @mode=ajax needs to be rendered from server, but I cannot imagine scenario where developer really needs to collapse the node and request this from server (request is needed only for expading) - as the solution I propose to introduce new mode ajax-expanding.

            This can be used to trigger server-side listeners. Anyway, we can add one more mode - please add JIRA RFC and we'll discuss. 

            https://issues.jboss.org/browse/RF-10016

             

            If you are sure no other situation than triggering nodeToggleListener is considerable, we can use it for optimization and don't fire requests when nodeToggleListener not specified and mode=ajax/server.