You would need to add a new javax.faces.component.UISeelctItems control as a child of the HtmlSelectOne control.
For example, I haven’t tried it, but it would be something like below. You didn’t say which version of MWS you are using, but if it is a recent version, it is safest to manipulate the component tree by overriding the preRenderResponse method and doing the logic there.
/* (non-Javadoc)
* @see com.webmethods.caf.faces.bean.BaseViewBean#preRenderResponse(javax.faces.event.PreRenderViewEvent)
*/
@Override
public void preRenderResponse(PreRenderViewEvent e) {
//get the dropdown control
HtmlSelectOne dropdown = (HtmlSelectOne)findComponentInRoot("your_dropdown_id_here");
List<UIComponent> children = dropdown.getChildren();
//TODO: clear the list if you wish to remove any previously existing children.
// children.clear();
//add new children
UISelectItems selectGroup = new UISelectItems();
ISelectItemGroupProvider groupProvider = null; //TODO: construct the provider from your data
selectGroup.setValue(groupProvider);
//add to the list of children
children.add(selectGroup);
super.preRenderResponse(e);
}
#webMethods#webMethods-BPMS#MWS-CAF-Task-Engine