Improvement to Groups wizard step in order to allow panel customization
authorskylark17 <matteo.alessandroni@tirasa.net>
Thu, 2 Aug 2018 15:32:29 +0000 (17:32 +0200)
committerskylark17 <matteo.alessandroni@tirasa.net>
Fri, 3 Aug 2018 07:31:53 +0000 (09:31 +0200)
client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java
client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/Groups.html

index 29e4111..67d7d12 100644 (file)
@@ -71,6 +71,10 @@ public class Groups extends WizardStep implements ICondition {
 
     private boolean templateMode;
 
+    protected WebMarkupContainer dyngroupsContainer;
+
+    protected WebMarkupContainer dynrealmsContainer;
+
     public <T extends AnyTO> Groups(final AnyWrapper<T> modelObject, final boolean templateMode) {
         super();
         this.templateMode = templateMode;
@@ -94,7 +98,7 @@ public class Groups extends WizardStep implements ICondition {
         groupsContainer.setOutputMarkupPlaceholderTag(true);
         add(groupsContainer);
 
-        WebMarkupContainer dyngroupsContainer = new WebMarkupContainer("dyngroupsContainer");
+        dyngroupsContainer = new WebMarkupContainer("dyngroupsContainer");
         dyngroupsContainer.setOutputMarkupId(true);
         dyngroupsContainer.setOutputMarkupPlaceholderTag(true);
         add(dyngroupsContainer);
@@ -178,10 +182,14 @@ public class Groups extends WizardStep implements ICondition {
             // ---------------------------------
         }
 
-        add(new AjaxPalettePanel.Builder<>().build("dynrealms",
+        dynrealmsContainer = new WebMarkupContainer("dynrealmsContainer");
+        dynrealmsContainer.setOutputMarkupId(true);
+        dynrealmsContainer.setOutputMarkupPlaceholderTag(true);
+        dynrealmsContainer.add(new AjaxPalettePanel.Builder<>().build("dynrealms",
                 new PropertyModel<>(anyTO, "dynRealms"),
                 new ListModel<>(allDynRealms.stream().map(EntityTO::getKey).collect(Collectors.toList()))).
                 hideLabel().setEnabled(false).setOutputMarkupId(true));
+        add(dynrealmsContainer);
 
         // ------------------
         // insert changed label if needed
index 10b6524..4cf95ab 100644 (file)
@@ -45,15 +45,17 @@ under the License.
       </div>
     </div>
 
-    <div class="col-xs-12">
-      <div class="box">
-        <div class="box-header">
-          <h3 class="box-title">
-            <wicket:message key="dynrealms.palette">[DYNAMIC REALMS]</wicket:message>
-          </h3>
-        </div>
-        <div class="box-body">
-          <span wicket:id="dynrealms">[DYNAMIC GROUPS]</span>
+    <div class="col-xs-12" wicket:id="dynrealmsContainer">
+      <div class="col-xs-12">
+        <div class="box">
+          <div class="box-header">
+            <h3 class="box-title">
+              <wicket:message key="dynrealms.palette">[DYNAMIC REALMS]</wicket:message>
+            </h3>
+          </div>
+          <div class="box-body">
+            <span wicket:id="dynrealms">[DYNAMIC GROUPS]</span>
+          </div>
         </div>
       </div>
     </div>