{
final List<UserRightVO> userRights = userRightDao.getUserRights(data);
boolean first = true;
boolean odd = true;
for (final UserRightVO rightVO : userRights) {
final UserRight right = rightVO.getRight();
final UserRightValue[] availableValues = right.getAvailableValues(((UserDao) getBaseDao()).getUserGroupCache(), data);
if (right.isConfigurable(((UserDao) getBaseDao()).getUserGroupCache(), data) == false) {
continue;
}
if (first == true) {
gridBuilder.newGridPanel();
gridBuilder.newFormHeading(getString("access.rights"));
rightsData = new UserRightsEditData();
first = false;
}
if (odd == true) {
// gridBuilder.newNestedRowPanel();
}
odd = !odd;
gridBuilder.newSplitPanel(GridSize.COL50);
rightsData.addRight(rightVO);
final String label = getString(right.getId().getI18nKey());
final FieldsetPanel fs = gridBuilder.newFieldset(label);
if (right.isBooleanType() == true) {
fs.addCheckBox(new PropertyModel<Boolean>(rightVO, "booleanValue"), null);
} else {
final LabelValueChoiceRenderer<UserRightValue> valueChoiceRenderer = new LabelValueChoiceRenderer<UserRightValue>(fs,
availableValues);
final DropDownChoice<UserRightValue> valueChoice = new DropDownChoice<UserRightValue>(fs.getDropDownChoiceId(),