diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/PolicyView.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/PolicyView.java index f090a61a3..0761eb238 100644 --- a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/PolicyView.java +++ b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/PolicyView.java @@ -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 @@ -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 @@ -262,12 +262,4 @@ private ResourceDescription complexAttributeDescription(ResourceDescription reso } return new ResourceDescription(payload); } - - private ModelNode payload(Map changeset) { - ModelNode modelNode = new ModelNode(); - for (Map.Entry entry : changeset.entrySet()) { - modelNode.get(entry.getKey()).set(entry.getValue()); - } - return modelNode; - } }