1. #1
    Ext User
    Join Date
    Apr 2008
    Location
    Munich, Germany
    Posts
    43
    Vote Rating
    0
    flow is on a distinguished road

      0  

    Question GXT Beta 4: Changes to SelectionChangedListener

    GXT Beta 4: Changes to SelectionChangedListener


    Hi Darrell,

    why is it that the former existing interface SelectionChangedListener is now replaced by the concrete class SelectionChangedListener (which implements the interface Listener<SelectionChangedEvent<ModelData>>)?
    Until now, my views implemented the Interface SelectionChangedListener to react on any changes (let's say in tables), which was IMO quite convenient. Or was this the wrong approach? What's the idea behind it?

    Thanks for clarification,
    Flo~

  2. #2
    Ext User
    Join Date
    Apr 2008
    Location
    Munich, Germany
    Posts
    43
    Vote Rating
    0
    flow is on a distinguished road

      0  

    Default


    My other approach would be to let the View implement Listener<SelectionChangedEvent<M>>. But unfortunatelly, the StoreBinder expexts an instance of the SelectionChangedListener!
    Code:
      
    public void addSelectionChangedListener(SelectionChangedListener listener) {
        addListener(Events.SelectionChange, listener);
      }
    I suggest to change the signature of the method to something like
    Code:
      public void addSelectionChangedListener(Listener<SelectionChangedEvent<M>> listener) {
        addListener(Events.SelectionChange, listener);
      }

  3. #3
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default


    I am considering changing my Implementations of SelectionChangedListener<M> to inner classes that extend SelectionChangedListener, but IMHO this is not as nice as it was before. Are there any best practices on how to solve this best? Darell, maybe you can provide us with insight on why this has been changed and what are its advantages?

    Thanks a lot in advance,
    Joachim

  4. #4
    Ext User
    Join Date
    May 2008
    Posts
    105
    Vote Rating
    0
    Grandiosa is on a distinguished road

      0  

    Default


    +1

    At least the SelectionChangedListener should be made abstract so my IDE can automatically create a body for the anonymous class.

  5. #5
    Ext User
    Join Date
    Apr 2008
    Location
    Munich, Germany
    Posts
    43
    Vote Rating
    0
    flow is on a distinguished road

      0  

    Default


    Any new opinions about the discussion "SelectionChangedListener"?

Thread Participants: 2

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