Search code examples
gwtgxt

Add collapse event to the GWT - GXT combo box


Even though the requirement is simple, I feel that this is eating my time, i'm trying to add a collapse event to the gwt gxt combobox, i'm using the version 2.1 gwt. Any small snippet will be helpful. the version of the library that i have do not support addCollapsehandler event, i've tried to do with addHandler, i do not know how to proceed on this.

Thanks.


Solution

  • This would be the normal way to do that:

    Listener<FieldEvent> collapseListener = new Listener<FieldEvent>() {
        @Override void handleEvent(FieldEvent fe) {
                // collapse handler here
        }
    }
    
    comboBox.addListener(Events.Collapse, collapseListener);