Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Programatically clicking a tree node from history change listener

    Hey,

    I'm trying to create a metamodel editor GUI for a project of mine, and been playing with the history support to make sure back/forward buttons work, which worked fine. I also added a CellClickHandler to do stuff when I select nodes in the tree, and updated my editor GUI in that handler. To support history though, I wanted the possibility to both expand the selected node, and select (click) it, so that the same ClickHandler would be used. This didn't work out (I didn't find an obvious way to do that from the TreeGrid/Tree api). So I ended up using a SelectionChangedHandler, and history change listener does something like that:
    Code:
                    this.processSelectHandler = false;
                    attributeTypes.deselectAllRecords();
                    this.processSelectHandler = true;
                    attributeTypes.selectRecord(record);
    My problem here is that the SelectionChangedHandler intercepts deselectAllRecords() (as well as fires multiple times if I do selectSingleRecord(), I assume it essentially deselects all and selects one), so I need the processing flag to enable/disable my SelectionChangedHandler.

    I am pretty sure I'm missing something obvious - could you please point me in the right direction, what's the best handler to use in such a situation?

    regards,
    Andrius

    #2
    Same issue here... Have you found a solution to this? Is it not possible to fire a "click"-Event after the row is selected?
    Last edited by krigu; 1 Jun 2010, 02:17.

    Comment

    Working...
    X