You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/07/20 14:58:15 UTC

[21/43] syncope git commit: [SYNCOPE-891] fixes

[SYNCOPE-891] fixes


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/5d95efac
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/5d95efac
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/5d95efac

Branch: refs/heads/2_0_NO_JAXB
Commit: 5d95efacd81771a64c6d530f3403cb7b0f8d914d
Parents: b1f7576
Author: fmartelli <fa...@gmail.com>
Authored: Mon Jul 11 16:11:24 2016 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Mon Jul 11 16:11:24 2016 +0200

----------------------------------------------------------------------
 .../wizards/resources/ResourceMappingPanel.java      | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/5d95efac/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java
index 476cb5c..8c02c36 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java
@@ -183,11 +183,11 @@ public class ResourceMappingPanel extends Panel {
         mappingContainer.add(new Label("intAttrNameInfo", Model.of()).add(new PopoverBehavior(
                 Model.<String>of(),
                 Model.of(getString("intAttrNameInfo.help")
-                        + "<div style=\"font-size: 10px;\">"
-                        + "<code>groups[groupName].attribute</code>\n"
-                        + "<code>anyObjects[anyObjectName].attribute</code>\n"
-                        + "<code>memberships[groupName].attribute</code>\n"
-                        + "</div>"),
+                + "<div style=\"font-size: 10px;\">"
+                + "<code>groups[groupName].attribute</code>\n"
+                + "<code>anyObjects[anyObjectName].attribute</code>\n"
+                + "<code>memberships[groupName].attribute</code>\n"
+                + "</div>"),
                 new PopoverConfig().withHtml(true).withPlacement(TooltipConfig.Placement.bottom)) {
 
             private static final long serialVersionUID = -7867802555691605021L;
@@ -308,6 +308,7 @@ public class ResourceMappingPanel extends Panel {
                         new PropertyModel<String>(mapItem, "mandatoryCondition"));
                 mandatory.hideLabel();
                 mandatory.setChoices(Arrays.asList(new String[] { "true", "false" }));
+                mandatory.setEnabled(!mapItem.isConnObjectKey());
                 item.add(mandatory);
                 // -------------------------------
 
@@ -389,9 +390,11 @@ public class ResourceMappingPanel extends Panel {
                     protected void onUpdate(final AjaxRequestTarget target) {
                         if (connObjectKey.getModelObject()) {
                             mapItem.setMandatoryCondition("true");
+                            mandatory.setModelObject("true");
                             mandatory.setEnabled(false);
                         } else {
                             mapItem.setMandatoryCondition("false");
+                            mandatory.setModelObject("false");
                             mandatory.setEnabled(true);
                         }
                         target.add(mandatory);
@@ -415,8 +418,8 @@ public class ResourceMappingPanel extends Panel {
                     }
                 });
 
-                setAttrNames(intAttrName);
                 setConnObjectKey(connObjectKey, password);
+                setAttrNames(intAttrName);
 
                 if (!AnyTypeKind.USER.name().equals(provisionTO.getAnyType())) {
                     password.setVisible(false);