how to add column of ClickableTextCells to cellTable

后端 未结 3 514
挽巷
挽巷 2021-01-12 23:17

hi all i need a simple example show me how to add column of ClickableTextCells to cellTable

thanks.

3条回答
  •  野的像风
    2021-01-12 23:38

    Column newCol = new Column(new  ClickableTextCell()) {
        @Override
        public String getValue(YearValueObject obj) {
            return obj.someMethod();
        }
    
    };
    
    newCol.setFieldUpdater(new FieldUpdater() {
        @Override
        public void update(int index, YerValueObject obj, String value) {
            //do whatever you need to here...
        }
    });
    
    table.addColumn(newCol, "ClickColumn");
    

提交回复
热议问题