I have a group table that is grouped on a enum field. I want to programmatically expand all but one of the groups. How could I retrieve the groupinfo for a specific enum option? Note that the specific enum option might not be present in the data set.
// Expand everything except the Ok findings
authChecksDs.addCollectionChangeListener(e -> {
if (e.getOperation().equals(CollectionDatasource.Operation.REFRESH)) {
authChecksTable.expandAll();
// Collapse the Ok group - Not sure how to do this...
authChecksTable.collapse( authChecksDs.getGroupInfo(Result.OK)); // ?????
}
});
You can iterate result of GroupDatasource#rootGroups() (and nested groups) and find GroupInfo that have value that equals to Result.OK. Call GroupInfo#getValue() to get value associated with group info.