Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Location
    Earth
    Posts
    243
    Vote Rating
    1
    nbuesing is on a distinguished road

      0  

    Default DualListField onRemove() events not called when "all" buttons are used.

    DualListField onRemove() events not called when "all" buttons are used.


    Version: GXT 3.0.0
    Browser: Internet Explorer 8, Windows 7
    Mode: Development Mode
    Virtual Machine: No

    If you select all from the DualList Field the onRemove events are not called. The onAdd is called for the destination store, but the source store onRemove events are not called.

    An example is provided. The screenshot gives clarity to the buttons that I'm using (and the events not happening).

    Now, I cannot use the onAdd() event of the destination to do the event processing, since the contents of the from Store remain at the time this event is being called (so add happens first events called, and then the contents of the other list appears to be removed, but w/out the event).

    DualList.png

    Code:
            toStore.addStoreAddHandler(new StoreAddHandler<Code>() {
                @Override
                public void onAdd(StoreAddEvent<Code> event) {
                    System.out.println("toList.onAdd()");
                }
            });
    
    
            toStore.addStoreRemoveHandler(new StoreRemoveHandler<Code>() {
                @Override
                public void onRemove(StoreRemoveEvent<Code> event) {
                            //NOT CALLED FROM THE REMOVE BUTTON
                    System.out.println("toList.onRemove()");
                }
            });
    
    
            fromStore.addStoreAddHandler(new StoreAddHandler<Code>() {
                @Override
                public void onAdd(StoreAddEvent<Code> event) {
                    System.out.println("fromList.onAdd()");
                }
            });
    
    
            fromStore.addStoreRemoveHandler(new StoreRemoveHandler<Code>() {
                @Override
                public void onRemove(StoreRemoveEvent<Code> event) {
                                    //NOT CALLED FROM THE ADD ALL BUTTON
                    System.out.println("fromList.onRemove()");
                }
            });
    DualList.zip
    Last edited by nbuesing; 8 May 2012 at 8:16 AM. Reason: forgot environment details

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Removing all items fires the stores Clear event. Have you tried to listen to this one?

  3. #3
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Location
    Earth
    Posts
    243
    Vote Rating
    1
    nbuesing is on a distinguished road

      0  

    Default


    Your right, onClear works. Sorry I missed that. My excuse is that I was trying to look for a "balance" to the multiple onAdds() being called, but a single clear is obviously much better.

    Thanks. Feel free to make this issue issue as a non-issue or closed (as you see fit).

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar