1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    1
    Vote Rating
    0
    ventus is on a distinguished road

      0  

    Default DualListField and Listener

    DualListField and Listener


    Hi!
    I have created a duallistfield and I wanted to add a listener for the selected rows in the second List.
    If I click on a line, a new window is opened. This window contains the text of the selected row.

    this is my code:
    Code:
    final DualListField dualListField = new DualListField();
    dualListField.setFieldLabel("Show");
                   
    dualListField.getFromList().setStore(st);
    dualListField.getFromList().setDisplayField("name");
            
    dualListField.getToList().setStore(new ListStore());
    dualListField.getToList().setDisplayField("name");
    
    dualListField.getToList().addListener(Events.CellClick, new SelectionListener<FieldEvent>() {
        @Override
         public void componentSelected(FieldEvent ce) {
            // open new window
        }
                
    });
    How it works?
    What event fires when I click?
    And the text as it is passed?

    Thank you

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Nov 2010
    Posts
    209
    Vote Rating
    -2
    Ersmarker has a little shameless behaviour in the past

      0  

    Default


    See the example below
    Code:
    dualListField.getToList().getListView().getSelectionModel().addListener(Events.SelectionChange, new Listener<SelectionChangedEvent>() {
        @Override
         public void handleEvent(SelectionChangedEvent be) {
               // Get the selection Model
               ModelData m = be.getSelectedItem();
          }
    });

Thread Participants: 1

Tags for this Thread

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