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??