WebMarkupContainer parameters = new WebMarkupContainer("parameters");
add(parameters);
MetaDataRoleAuthorizationStrategy.authorize(parameters, ENABLE, xmlRolesReader.getAllAllowedRoles(
"Configuration", "list"));
final ConfTO conf = confRestClient.list();
final Form<?> form = new Form<Void>("confForm");
form.setModel(new CompoundPropertyModel(conf));
parameters.add(form);
form.add(new AttributesPanel("parameters", conf, form, false));
IndicatingAjaxLink<Void> save = new IndicatingAjaxLink<Void>("saveParameters") {
private static final long serialVersionUID = -7978723352517770644L;
@Override
public void onClick(final AjaxRequestTarget target) {
final ConfTO updatedConf = (ConfTO) form.getModelObject();
try {
for (AttributeTO attr : updatedConf.getAttrs()) {
if (attr.getValues().isEmpty()
|| attr.getValues().equals(Collections.singletonList(StringUtils.EMPTY))) {
confRestClient.delete(attr.getSchema());
} else {