From 217c0dbaa9323f0e6ad90270c5ad51ce9c577436 Mon Sep 17 00:00:00 2001 From: Michal Petrov Date: Fri, 27 Oct 2017 15:27:49 +0200 Subject: [PATCH] HAL-1385/JBEAP-13587: fix policy updating form --- .../client/shared/subsys/elytron/ui/PolicyView.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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; - } }