Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 25EB1200CC8 for ; Fri, 14 Jul 2017 13:06:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2460F16D8F5; Fri, 14 Jul 2017 11:06:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6B4D416D8F3 for ; Fri, 14 Jul 2017 13:06:00 +0200 (CEST) Received: (qmail 74346 invoked by uid 500); 14 Jul 2017 11:05:59 -0000 Mailing-List: contact commits-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list commits@syncope.apache.org Received: (qmail 74337 invoked by uid 99); 14 Jul 2017 11:05:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jul 2017 11:05:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8E0ACDFC28; Fri, 14 Jul 2017 11:05:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: ilgrosso@apache.org To: commits@syncope.apache.org Date: Fri, 14 Jul 2017 11:05:58 -0000 Message-Id: <2d6f2dd2e2224eb8aea92962ffb102d4@git.apache.org> In-Reply-To: <18ce2a17ce0b4964ae963a75b4739e50@git.apache.org> References: <18ce2a17ce0b4964ae963a75b4739e50@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] syncope git commit: [SYNCOPE-1151] Realm is correctly loaded after creation - This closes #56 archived-at: Fri, 14 Jul 2017 11:06:01 -0000 [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 Authored: Fri Jul 14 12:12:46 2017 +0200 Committer: Francesco Chicchiriccò 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> subtree : tree.values()) { for (RealmTO child : subtree.getRight()) {