1. #1
    Ext User
    Join Date
    Oct 2008
    Posts
    28
    Vote Rating
    0
    samwells is on a distinguished road

      0  

    Question Problem with addSelectionListener() ...

    Problem with addSelectionListener() ...


    I have a problem with menuItem.addSelectionListener()

    See the code below

    MenuItem menuItem = new MenuItem("Open");
    menuItem.addSelectionListener(new SelectionListener<ComponentEvent>() {

    public void componentSelected(ComponentEvent event) {

    // doing some operation
    System.out.println("Open menuitem selected");

    }
    This code is working properly the selectionlistener is working
    when i click the menuitem I get the print as
    Open menuitem selected

    But in the below code selectionlistener is not working

    MenuItem menuItem = new MenuItem("Open");
    menuItem.addSelectionListener(new MenuListener());


    // And my MenuListener class is like this

    class MenuListener extends SelectionListener<ComponentEvent> {

    MenuListener()
    }

    public void componentSelected(ComponentEvent ce) {
    // doing some operation
    System.out.println("Open menuitem selected");
    }

    public void handleEvent(ComponentEvent be) {

    }
    }

    Is this correct way to extend the selection listener class or
    we cannot extend selectionlistener class

    Thanks in advance

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    don't override handleEvent, or call super.handleEvent(be);

  3. #3
    Ext User
    Join Date
    Oct 2008
    Posts
    28
    Vote Rating
    0
    samwells is on a distinguished road

      0  

    Thumbs up


    Thanks for the help its working now

    Sam

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