Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-2738 in 3.0.4.
  1. #1
    Sencha Premium Member
    Join Date
    Jun 2012
    Vote Rating
    MiguelFG is on a distinguished road


    Default ListField not firing selection change with multiple selections

    Thanks Collin, I installed the library manually with mvn install:install-file... and it worked.

    However, I need to ask for your help with something i think it might be an issue with GXT 3.0.3 (In fact at least from GXT 3.0.1+ as i upgraded from GXT 3.0.1 to GXT 3.0.3 to see if the problem I have detected was fixed).

    The problem I have detected is related to ListField component using a ListView and a ListStore with Multiple Selection. ListField widget working in Multiple Selection is supposed to deal properly with SHIFT key in order to perform multiple selection. For instance, in a ListField with 5 entries you could click the first entry with the mouse and then press "SHIFT" key and click on the last entry. This should select the 5 entries.

    All this works fine if you are always selecting entries that are visible (you don't need to use scroll) but if you have scroll in your ListField when you select a visible entry, press "SHIFT", scroll down and click the end element for the multiple selection then the onSelectionChanged event is not fired even though in the GUI the entries appear as selected.

    I think i'm using the components correctly. I would say it is a bug, so I would like your help to confirm this and in case it is, to take it into account to fix it when you can.

    With the following code you can try this easily. If you had any doubt or you needed further explanation, please tell me.

    Thanks so much.

    package listview.test.client;

    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.editor.client.Editor.Path;
    import com.google.gwt.user.client.rpc.IsSerializable;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.google.gwt.user.client.ui.VerticalPanel;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.core.client.Style.SelectionMode;
    import com.sencha.gxt.core.client.ValueProvider;
    import com.sencha.gxt.data.shared.LabelProvider;
    import com.sencha.gxt.data.shared.ListStore;
    import com.sencha.gxt.data.shared.ModelKeyProvider;
    import com.sencha.gxt.data.shared.PropertyAccess;
    import com.sencha.gxt.widget.core.client.ContentPanel;
    import com.sencha.gxt.widget.core.client.ListView;
    import com.sencha.gxt.widget.core.client.box.MessageBox;
    import com.sencha.gxt.widget.core.client.form.ListField;
    import com.sencha.gxt.widget.core.client.selection.SelectionChangedEvent;
    import com.sencha.gxt.widget.core.client.selection.SelectionChangedEvent.SelectionChangedHandler;

    * Entry point classes define <code>onModuleLoad()</code>.
    public class TestSenchaListView implements IsWidget, EntryPoint {

    interface GWTItemProperties extends PropertyAccess<GWTItemVO> {
    ModelKeyProvider<GWTItemVO> id();

    LabelProvider<GWTItemVO> nombre();

    ValueProvider<GWTItemVO, String> nombreProp();

    public class GWTItemVO implements IsSerializable {
    private static final long serialVersionUID = 7431357982859482224L;
    private Long id;
    private String name;

    public Long getId() {
    return id;

    public String getName() {
    return name;

    public void setId(Long id) {
    this.id = id;

    public void setName(String name) {
    this.name = name;

    private VerticalPanel vp;

    ListField<GWTItemVO, String> exampleListField;

    ListStore<GWTItemVO> exampleListFieldStore;
    ListView<GWTItemVO, String> exampleListFieldView;

    public Widget asWidget() {

    final GWTItemProperties itemProps = GWT.create(GWTItemProperties.class);
    exampleListFieldStore = new ListStore<GWTItemVO>(itemProps.id());
    exampleListFieldView = new ListView<GWTItemVO, String>(
    exampleListFieldStore, itemProps.nombreProp());
    new SelectionChangedHandler<GWTItemVO>() {
    public void onSelectionChanged(
    final SelectionChangedEvent<GWTItemVO> event) {
    MessageBox test = new MessageBox(
    "event.getSelection().size(): "
    + event.getSelection().size()
    + " event.getSource().getSelectedItems().size(): "
    + event.getSource().getSelectedItems()

    for (long i = 0; i < 10; i++) {
    GWTItemVO a = new GWTItemVO();
    a.setName("Entry " + i + " out of 10");

    exampleListField = new ListField<GWTItemVO, String>(
    exampleListField.setPixelSize(300, 100);

    vp = new VerticalPanel();

    ContentPanel cp = new ContentPanel();
    cp.setHeadingText("Testing Multiple selection (CTRL + SHIFT) in ListField with ListView");



    return vp;

    public void onModuleLoad() {

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Washington, DC
    Vote Rating
    darrellmeyer is on a distinguished road



    Thanks for the report! I have opened a bug in our bug tracker.

    I created a new bug thread from your post and moved it to the bugs forum. In the future, please don't report bugs on a general announcement. Thanks.

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2012
    Vote Rating
    MiguelFG is on a distinguished road



    Hi Sencha dev Team,

    I have upgraded to GXT 3.0.4 because in theory the bug EXTGWT-2738 is fixed in this version, but it is not. It is not working.
    I found this bug some months ago and Collin posted it as a bug.

    Could you please have a look to confirm that the bug fixing was not included in 3.0.4 and take it into account to include it in a release when you can?

    Thanks so much.



Thread Participants: 1