0

I have a cell table with a custom button as a footer in one of the columns which works fine. But when I try to move the button to another column the clickevent (valueupdater) of the button does not work anymore. I simply add the button as a footer in another column no changes in the functionality are done! Here is how its done:

public class TestCellTable extends CellTable<Object> {
    ...
    public TestCellTable() {
        ...
        addFirstColumn();
        addSecondColumn();
        addThirdColumn();
        ...
   }

  public static abstract class FooterButton extends Header<String> {    
    public ButtonFooter(ValueUpdater<String> value) {
        super(new ButtonCell());
        this.setUpdater(value);
    }
}




   private Header<String> initButton() {
     ValueUpdater<String> updater = new ValueUpdater<String>() {
        @Override
        public void update(String value) {
            Window.alert("TEST");           
        }
    };

    Header<String> footer = new FooterButton(updater) { 
          @Override
          public String getValue() {
             return "TEST";
          }
    };
    return footer;
}




   public void addFirstColumn() {
        ...
        addColumn(COLUMN, HEADER, initButton());
   }

   public void addSecondColumn() {
       ...
       addColumn(COLUMN, HEADER);
   }

   public void addThirdColumn() {
       ...
       addColumn(COLUMN, HEADER);
   }
}

I just would like to move the button from the first Column to the send column but then when I click the button nothing happens??

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
wasp256
  • 5,943
  • 12
  • 72
  • 119
  • Do you mean that you simply change the source or do you move your button dynamically from code somehow? – jabal Nov 14 '12 at 09:40
  • no I just change the source, instead to add the button in the first column with addColumn(COLUMN, HEADER, initButton()); I add it in the addSecondColumn-Method... – wasp256 Nov 14 '12 at 09:51

0 Answers0