Ok, so I found a way to make it work, based on the SAG documentation for “BoundPropertiesSelectItemGroupProvider”:
I declared a bean managed property to store the provider:
private com.webmethods.caf.faces.data.object.BoundPropertiesSelectItemGroupProvider resultProvider = null;
Then, I created a class of my very own to store the items:
public class MyItem {
public String value;
public String label;
public MyItem() {}
public String getValue() {
return this.value;
}
public String getLabel() {
return this.label;
}
public void setLabel(String label) {
this.label=label;
}
public void setValue(String value) {
this.value=value;
}
}
Then in the view class I had to use my class to populate a List:
java.util.List list = new java.util.ArrayList();
MyItem item = new MyItem();
item.setLabel("label text");
item.setValue("value text");
list.add(item);
Then I added the list to the Provider:
this.resultProvider = new BoundPropertiesSelectItemGroupProvider(list, "item", "#{item.value}", "#{item.label}");
Finally I could bind the Option Group of the dropdown to the provider, and it works!
#webMethods-BPMS#MWS-CAF-Task-Engine#webMethods