syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/2] syncope git commit: [SYNCOPE-1151] Realm is correctly loaded after creation - This closes #56
Date Fri, 14 Jul 2017 11:05:58 GMT
[SYNCOPE-1151] Realm is correctly loaded after creation - This closes #56


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

Branch: refs/heads/master
Commit: 8d2d9edc5af8b1017731c1c711f9e3b934f2896f
Parents: 020a35c
Author: Matteo Alessandroni <matteo.alessandroni@tirasa.net>
Authored: Fri Jul 14 12:12:46 2017 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Jul 14 13:05:35 2017 +0200

----------------------------------------------------------------------
 .../org/apache/syncope/client/console/pages/Realms.java   | 10 +++++-----
 .../syncope/client/console/panels/RealmChoicePanel.java   |  4 ++++
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/8d2d9edc/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
index b801cf3..b87ab2c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
@@ -196,15 +196,15 @@ public class Realms extends BasePage {
                         if (modal.getContent() instanceof ResultPage) {
                             Serializable result = ResultPage.class.cast(modal.getContent()).getResult();
 
-                            RealmTO reamTO = RealmTO.class.cast(ProvisioningResult.class.cast(result).getEntity());
+                            RealmTO newRealmTO = RealmTO.class.cast(ProvisioningResult.class.cast(result).getEntity());
                             // reload realmChoicePanel label too - SYNCOPE-1151
-                            target.add(realmChoicePanel.reloadRealmTree(target, Model.of(reamTO)));
-                            updateRealmContent(reamTO, selectedIndex);
-
-                            target.add(content);
+                            target.add(realmChoicePanel.reloadRealmTree(target, Model.of(newRealmTO)));
+                            realmChoicePanel.setCurrentRealm(newRealmTO);
+                            send(Realms.this, Broadcast.DEPTH, new ChosenRealm<>(newRealmTO,
target));
                         } else {
                             target.add(realmChoicePanel.reloadRealmTree(target));
                         }
+                        target.add(content);
                         modal.show(false);
                     }
                 });

http://git-wip-us.apache.org/repos/asf/syncope/blob/8d2d9edc/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java
index 51f766a..79c3322 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java
@@ -380,6 +380,10 @@ public class RealmChoicePanel extends Panel {
         return model.getObject();
     }
 
+    public void setCurrentRealm(final RealmTO realmTO) {
+        model.setObject(realmTO);
+    }
+
     public RealmTO moveToParentRealm(final String key) {
         for (Pair<RealmTO, List<RealmTO>> subtree : tree.values()) {
             for (RealmTO child : subtree.getRight()) {


Mime
View raw message