Hi
I want my browser table rows should be styled based on value of a specific column.
In Account Entity there is a field AccountHeader (TRUE/FALSE). If the value is true, the row should be in bold. However, I get only one row worked with this styling. How can I get all the rows styled if qualified?
Here is the code:
@Override
public void init(Map<String, Object> params) {
accountsTable.setStyleProvider(new Table.StyleProvider<Account>() {
@Override
public String getStyleName(Account entity, @Nullable String property) {
Account account = (Account) entity;
if(account.getAccountHeader()==true){
return "header-account";
}
return null;
}
});
}