use of com.sun.web.ui.view.html.CCRadioButton in project OpenAM by OpenRock.
the class MAPCreateDeviceViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
disableButton("button1", true);
MAPCreateDeviceModel model = (MAPCreateDeviceModel) getModel();
String profileName = (String) getPageSessionAttribute(MAPClientManagerViewBean.PAGE_SESSION_PROFILE_NAME);
Set styles = model.getStyleNames(profileName);
if ((styles != null) && !styles.isEmpty()) {
CCRadioButton btn = (CCRadioButton) getChild(RADIO_STYLE);
OptionList styleList = new OptionList();
for (Iterator iter = styles.iterator(); iter.hasNext(); ) {
String name = (String) iter.next();
styleList.add(name, name);
}
btn.setOptions(styleList);
String value = (String) getDisplayFieldValue(RADIO_STYLE);
if ((value == null) || (value.trim().length() == 0)) {
setDisplayFieldValue(RADIO_STYLE, (String) styles.iterator().next());
}
}
}
Aggregations