Results 1 to 3 of 3

Thread: Click event on tree...

  1. #1

    Default Click event on tree...

    In gxt 2 I have on tree a Listener on Events.click:

    tree.addListener(Events.OnClick, new Listener<TreePanelEvent<ModelData>>()
    {
    public void handleEvent(TreePanelEvent<ModelData> be) {
    }
    });

    In gxt 3 how can I convert the code?

    Thanks & By

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Location
    Near Paris, France
    Posts
    140

    Default

    There is a recent thread on the topic...

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Canada
    Posts
    19

    Default

    The cell method doesn't give you access to the underlying models which are used to populate the tree.

    Code:
    tree.getSelectionModel().addSelectionChangedHandler(new SelectionChangedHandler<MyTreeModel>() {
        @Override
        public void onSelectionChanged(SelectionChangedEvent<MyTreeModel> event) {
            for (MyTreeModel model : event.getSelection()) {
                // since we may have more than one selected depending on the selection mode
            }
        }
    });

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •