Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

HAL-1385/JBEAP-13587: fix policy updating form #450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public String getValue(Property node) {
@SuppressWarnings("unchecked")
public void onSave(Map changeset) {
circuit.dispatch(new ModifyComplexAttribute(addressTemplate, CUSTOM_POLICY,
selectionModel.getSelectedObject().getName(), payload(changeset)));
selectionModel.getSelectedObject().getName(), customPolicyForm.getForm().getUpdatedEntity()));
}

@Override
Expand All @@ -180,7 +180,7 @@ public void onCancel(final Object entity) {
@SuppressWarnings("unchecked")
public void onSave(Map changeset) {
circuit.dispatch(new ModifyComplexAttribute(addressTemplate, JACC_POLICY,
selectionModel.getSelectedObject().getName(), payload(changeset)));
selectionModel.getSelectedObject().getName(), jaccPolicyForm.getForm().getUpdatedEntity()));
}

@Override
Expand Down Expand Up @@ -262,12 +262,4 @@ private ResourceDescription complexAttributeDescription(ResourceDescription reso
}
return new ResourceDescription(payload);
}

private ModelNode payload(Map<String, String> changeset) {
ModelNode modelNode = new ModelNode();
for (Map.Entry<String, String> entry : changeset.entrySet()) {
modelNode.get(entry.getKey()).set(entry.getValue());
}
return modelNode;
}
}