if (name == null) {
name = NO_NAME_ATTRIBUTE;
}
Object groupped = radioGroupped.get(name);
if (groupped instanceof FormToggleButtonModel) {
FormToggleButtonModel grouppedModel = (FormToggleButtonModel)groupped;
ButtonGroup buttonGroup;
if (grouppedModel.getGroup() != null) {
buttonGroup = grouppedModel.getGroup();
} else {
buttonGroup = new ButtonGroup();
grouppedModel.setGroup(buttonGroup);
}
buttonModel.setGroup(buttonGroup);
} else {
radioGroupped.put(name, buttonModel);
}