I have create a java class with string properties, i have get the dynamic data from database
and added this class to BeanItemContainer and attach to table data source.
here is the following code I have used to display the data in table.
public class Sample implements Serializable {
private String billOfladingNo;
private String containerNo;
//setters and getters
}
List result = executionPlanDelegate.getDatbleData();
Table table = new Table();
final BeanItemContainer container = new BeanItemContainer(ExecutionPlanVO.class, executionPlanVOs);
container.addBean(new Sample());
table.setContainerDataSource(container);
}
here table with two columns as strings displayed in UI,
here I would like to change the first column (billOfladingNo) as Link in table and populate the dynamic data which is coming from data base.
and when I click this link I want to search with same billOfladingNo name in the table like filters.
could someone help me how can I achieve this with vaadin ?
I have tried with other way like
table.addGeneratedColumn(“BillOfLading”, new Table.ColumnGenerator() {
public Component generateCell(Table source, Object itemId,
Object columnId) {
if (columnId.equals(“BillOfLading”)) {
Link bol = new Link(container.getItem(itemId).getBean().getBillOfladingNo(),null);
container.addItem(bol);
return bol;
}
return null;
}
});
but it is added another new column in table, and is there a way to replace the existing billOfladingNo column with type as link?