Styling table row - only first row works

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;
          }
    });
}

Hi,

Take a look at this sample. It contains exactly what you want to achieve: Customer row is displayed bold if a customer is active (i.e. active == true). The corresponding code is as the follows:

customerTable.setStyleProvider((entity, property) -> {
	if (property == null) {
		if (BooleanUtils.isTrue(entity.getActive())) {
			return "active-customer";
		}
	}
	...
}