The value for a generated column in datagrid not showing correctly,
the image above shows what is coming back. I tried with to generate a column with a buttonPanels and also tried with labels the way it was shown in the documentation just replacing the type.
DataGrid.Column column = dataGrid.addGeneratedColumn("loginUpperCase", new DataGrid.ColumnGenerator<EntityA, ButtonsPanel>(){
@Override
public ButtonsPanel getValue(DataGrid.ColumnGeneratorEvent<EntityA> event){
Button viewBtn = uiComponents.create(Button.class);
viewBtn.setAction(entityAView);
Button editBtn = uiComponents.create(Button.class);
editBtn.setAction(entityAEdit);
Button removeBtn = uiComponents.create(Button.class);
removeBtn.setAction(entityATableRemove);
ButtonsPanel buttonsPanel = uiComponents.create(ButtonsPanel.class);
if (opPermitted) {
buttonsPanel.add(viewBtn, editBtn, removeBtn);
} else {
buttonsPanel.add(viewBtn, removeBtn);
}
return buttonsPanel;
}
@Override
public Class<ButtonsPanel> getType(){
return ButtonsPanel.class;
}
}, 1);
column.setCaption("Login Upper Case");
}
regards,
Davia