eugenparaschiv
10 Oct 2008, 2:50 AM
Along the same lines as:
http://extjs.com/forum/showthread.php?t=49250&highlight=please+listeners
I would like to propose some other simple methods to be added to some GXT widgets. For example, event related methods, like:
widget.blur()
instead of:
final ComponentEvent blurEvent = new ComponentEvent( null );
blurEvent.type = Event.ONBLUR;
widget.onComponentEvent( blurEvent );
And what's more, if these methods would be added, some others could be made protected. For instance, if the blur() method is included (and the other ones of course, corresponding to the events), then onComponentEvent() could be made protected.
or selection methods, like:
comboBox.setSelectionMode(SelectionMode.SINGLE);
instead of:
final ListView listView = combo.getListView();
final ListViewSelectionModel selectionModel = listView.getSelectionModel();
selectionModel.setSelectionMode(SelectionMode.SINGLE);
true, you could chain these last calls, but then if one is null, debugging is harded to find out which one.
Anyways, I think that adding some convenience methods like these would make working with the library much easier.
http://extjs.com/forum/showthread.php?t=49250&highlight=please+listeners
I would like to propose some other simple methods to be added to some GXT widgets. For example, event related methods, like:
widget.blur()
instead of:
final ComponentEvent blurEvent = new ComponentEvent( null );
blurEvent.type = Event.ONBLUR;
widget.onComponentEvent( blurEvent );
And what's more, if these methods would be added, some others could be made protected. For instance, if the blur() method is included (and the other ones of course, corresponding to the events), then onComponentEvent() could be made protected.
or selection methods, like:
comboBox.setSelectionMode(SelectionMode.SINGLE);
instead of:
final ListView listView = combo.getListView();
final ListViewSelectionModel selectionModel = listView.getSelectionModel();
selectionModel.setSelectionMode(SelectionMode.SINGLE);
true, you could chain these last calls, but then if one is null, debugging is harded to find out which one.
Anyways, I think that adding some convenience methods like these would make working with the library much easier.