Hello everyone, is it possible to specify a style to the grouping line of a group table?
Regards,
Nelson F.
Hello everyone, is it possible to specify a style to the grouping line of a group table?
Regards,
Nelson F.
Hi,
yes, it is possible to specify a style to the grouping line.
First, you have to extend the theme. After that create a new style for the grouping line. Then, in the screen controller use the Style Provider to set your style to the grouping line:
@Override
public void init(Map<String, Object> params) {
foosTable.setStyleProvider(new GroupTable.GroupStyleProvider<Foo>() {
@Override
public String getStyleName(Entity entity, @Nullable String property) {
return null;
}
@Nullable
@Override
public String getStyleName(GroupInfo info) {
return "group-line-style";
}
});
}
@Override
public void init(Map<String, Object> params) {
filterField.addValueChangeListener(e -> applyFilter());
vendorRequestsTable.setStyleProvider(new GroupTable.GroupStyleProvider<VendorRequest>() {
@Override
public String getStyleName(VendorRequest entity, @Nullable String property) {
if ("requestStatus".equals(property)) {
if (entity.getRequestStatus().equals("REQUEST ACCEPTED")) {
return "released";
}
}
return null;
}
@Nullable
@Override
public String getStyleName(GroupInfo info) {
return "released";
}
});
}
This is my code. The style has affected only some rows… Why ?? @firstova