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

      0  

    Default Table: CellClick-Events is not fired?

    Table: CellClick-Events is not fired?


    Hi,

    I want to display some values in a Table with only one column. If the user clicks on a row, the particular cell in this row shall be made editable. I achieved this (or at least I think this should work) by using a special TableItem: it contains a container with a CardLayout that holds a TextField (for editing) and a Text (to display the value). The idea is that the CardContainer switches the displayed Widgets on the Event CellClick:

    Code:
    final Object[] cellItems = new Object[table.getColumnCount()];
    // Container to swap the displayed Widget
    final CardContainer cardContainer = new CardContainer();
    //Widget for editing
    final TextField textField = new TextField();
    textField .setFieldLabel(null);           
    textField .setValue("Some String");
    cardContainer.add(textField );
    // add simple Text
    cardContainer.add(new Text("Some String"));
    cellItems[0] = cardContainer;
    
    final TableItem item = new TableItem(cellItems);
    table.addListener(Events.CellClick, new Listener<BaseEvent>() {
       public void handleEvent(final BaseEvent be) {
             //For the moment, the swapping is not realized yet. But the method seems not to be called.
          cardContainer.setVisible(textField );
       }
    });
    table.add(item);
    For some reason, the Event seems not to be fired. How do I have to add the listener that I can handle CellClick-Events? Registering them at the TableItem didn't work either.

    Using GXT Beta 3 and GWT Milestone 2 in Hosted Mode.

    Cheers,
    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


    Btw, the Doubleclick works perfektly.
    Code:
    table.addListener(Events.CellDoubleClick, new Listener<TableEvent>() {
       public void handleEvent(final BaseEvent be) {
             //For the moment, the swapping is not realized yet. But the method seems not to be called.
          cardContainer.setVisible(textField );
       }
    });

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..."