1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    5
    Vote Rating
    0
    pras.nr is on a distinguished road

      0  

    Question storeRemove not getting called while using Remove all Button in DualListField

    storeRemove not getting called while using Remove all Button in DualListField


    I am using the following piece of code to track changes to the toStoreField
    It is able to track items removed using the drag functionality and also by using
    remove selected button.

    However it does not work for Remove All button.

    Code:
    public void storeRemove(StoreEvent<BeanModel> se) {
           
            super.storeRemove(se);
            BeanModel u  = se.getModel();
            //perform some operation
               
            }
        }
    Thereafter I tried to use the following piece of code
    which gives a null pointer error when the remove all button is used
    because e.getModel() is returned as null. If I use
    e.getModels() method then it works only for the Remove All button option and
    gives a null error in all other cases.

    Code:
     public void handleEvent(StoreEvent<BeanModel> e) {
            
             BeanModel u  = e.getModel(); 
              super.handleEvent(e);
        }

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    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


    removeAll clears the store, so you need to listen to the Clear event.

Similar Threads

  1. DualListField has "extra" textArea. How to remove?
    By br00ks in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 21 Jul 2010, 1:44 AM
  2. FormPanel Submit, button handler not being called
    By Slapyo in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 26 Oct 2007, 11:40 AM
  3. dialog(s) called from button on cell(s) in grid
    By mcrusty in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 26 Jan 2007, 12:28 AM

Thread Participants: 1

Tags for this Thread