Sections exclusive = getExclusiveSiblings(schema);
boolean bIsFirstExclusive = (exclusive.size() > 0) &&
(this == exclusive.values().iterator().next());
if (bIsFirstExclusive) {
HtmlSelectOneRadio radio = new HtmlSelectOneRadio();
radio.setId(sRadioId);
radio.setStyleClass("optionalSectionHeader");
radio.setOnclick(sbOnclick.toString());
ArrayList<SelectItem> radioItems = new ArrayList<SelectItem>();
UISelectItems uiItems = new UISelectItems();
uiItems.setValue(radioItems);
radio.getChildren().add(uiItems);
panel.getChildren().add(radio);
int nIdx = 0;
for (Section sibling: exclusive.values()) {
String sItemLabel = "";
String sItemId = sibling.getFacesId();
if (sibling.getLabel() != null) {
sItemLabel = msgBroker.retrieveMessage(sibling.getLabel().getResourceKey());
}
if (sItemLabel.length() == 0) {
sItemLabel = sibling.getKey();
}
radioItems.add(new SelectItem(sItemId,sItemLabel));
if (sibling.getOpen()) {
radio.setValue(sItemId);
}
nIdx++;
}
}