Hybrid View

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

      0  

    Default ListField not firing selection change with multiple selections

    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();


    @Path("name")
    LabelProvider<GWTItemVO> nombre();


    @Path("name")
    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;


    @Override
    public Widget asWidget() {


    final GWTItemProperties itemProps = GWT.create(GWTItemProperties.class);
    exampleListFieldStore = new ListStore<GWTItemVO>(itemProps.id());
    exampleListFieldView = new ListView<GWTItemVO, String>(
    exampleListFieldStore, itemProps.nombreProp());
    exampleListFieldView.getSelectionModel().setSelectionMode(
    SelectionMode.MULTI);
    exampleListFieldView.getSelectionModel().setVertical(true);
    exampleListFieldView.getSelectionModel().addSelectionChangedHandler(
    new SelectionChangedHandler<GWTItemVO>() {
    @Override
    public void onSelectionChanged(
    final SelectionChangedEvent<GWTItemVO> event) {
    MessageBox test = new MessageBox(
    "onSelectionChanged",
    "event.getSelection().size(): "
    + event.getSelection().size()
    + " event.getSource().getSelectedItems().size(): "
    + event.getSource().getSelectedItems()
    .size());
    test.show();
    }
    });




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


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


    vp = new VerticalPanel();
    vp.setSpacing(10);


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


    cp.add(exampleListField);


    cp.setResize(false);
    vp.add(cp);


    return vp;
    }


    @Override
    public void onModuleLoad() {
    RootPanel.get().add(asWidget());
    }
    }

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

      0  

    Default


    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
    Posts
    6
    Vote Rating
    0
    MiguelFG is on a distinguished road

      0  

    Default


    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.

    Regards,

    Miguel

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi