You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by sk...@apache.org on 2019/03/04 10:22:41 UTC

[syncope] branch 2_1_X updated: [SYNCOPE-1432] Topology now shows new created connectors and resources with no need of refreshing page

This is an automated email from the ASF dual-hosted git repository.

skylark17 pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_1_X by this push:
     new 09caa03  [SYNCOPE-1432] Topology now shows new created connectors and resources with no need of refreshing page
09caa03 is described below

commit 09caa03623acb526af229a5307b79b3a7313d56d
Author: skylark17 <ma...@tirasa.net>
AuthorDate: Mon Mar 4 11:21:48 2019 +0100

    [SYNCOPE-1432] Topology now shows new created connectors and resources with no need of refreshing page
---
 .../org/apache/syncope/client/console/SyncopeConsoleApplication.java | 4 ++--
 .../org/apache/syncope/client/console/wizards/any/AbstractAttrs.java | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
index e7b2035..af3c2f3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
@@ -56,8 +56,8 @@ import org.apache.wicket.authroles.authentication.AuthenticatedWebApplication;
 import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.protocol.http.CsrfPreventionRequestCycleListener;
 import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.protocol.ws.WebSocketAwareCsrfPreventionRequestCycleListener;
 import org.apache.wicket.request.cycle.IRequestCycleListener;
 import org.apache.wicket.protocol.ws.api.WebSocketResponse;
 import org.apache.wicket.request.cycle.RequestCycle;
@@ -206,7 +206,7 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
         getMarkupSettings().setCompressWhitespace(true);
 
         if (BooleanUtils.toBoolean(csrf)) {
-            getRequestCycleListeners().add(new CsrfPreventionRequestCycleListener());
+            getRequestCycleListeners().add(new WebSocketAwareCsrfPreventionRequestCycleListener());
         }
         getRequestCycleListeners().add(new SyncopeConsoleRequestCycleListener());
         getRequestCycleListeners().add(new IRequestCycleListener() {
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractAttrs.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractAttrs.java
index 7a315d6..fc65634 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractAttrs.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractAttrs.java
@@ -26,6 +26,7 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.syncope.client.console.rest.AnyTypeClassRestClient;
 import org.apache.syncope.client.console.rest.GroupRestClient;
@@ -172,8 +173,8 @@ public abstract class AbstractAttrs<S extends SchemaTO> extends WizardStep imple
     @Override
     public void renderHead(final IHeaderResponse response) {
         super.renderHead(response);
-        if (org.apache.cxf.common.util.CollectionUtils.isEmpty(attrTOs.getObject())
-                && org.apache.cxf.common.util.CollectionUtils.isEmpty(membershipTOs.getObject())) {
+        if (CollectionUtils.isEmpty(attrTOs.getObject())
+                && CollectionUtils.isEmpty(membershipTOs.getObject())) {
             response.render(OnDomReadyHeaderItem.forScript(
                     String.format("$('#emptyPlaceholder').append(\"%s\"); $('#attributes').hide();",
                             getString("attribute.empty.list"))));