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 2020/02/04 08:50:50 UTC

[syncope] branch 2_1_X updated: [SYNCOPE-1539] setRequired for AjaxPalettePanel (#165)

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

ilgrosso 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 1994060  [SYNCOPE-1539] setRequired for AjaxPalettePanel (#165)
1994060 is described below

commit 1994060913582156b756fcbe0d6aab395bf04f73
Author: DimaAy <di...@tirasa.net>
AuthorDate: Tue Feb 4 09:50:42 2020 +0100

    [SYNCOPE-1539] setRequired for AjaxPalettePanel (#165)
---
 .../client/console/wicket/markup/html/form/AjaxPalettePanel.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
index b7b502f..866ede4 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
@@ -174,7 +174,7 @@ public class AjaxPalettePanel<T extends Serializable> extends AbstractFieldPanel
             }
         };
 
-        add(palette.setOutputMarkupId(true));
+        add(palette.setLabel(new ResourceModel(name)).setOutputMarkupId(true));
 
         final Form<?> form = new Form<>("form");
         add(form.setEnabled(builder.filtered).setVisible(builder.filtered));
@@ -219,6 +219,12 @@ public class AjaxPalettePanel<T extends Serializable> extends AbstractFieldPanel
         return this;
     }
 
+    @Override
+    public AbstractFieldPanel<List<T>> setRequired(final boolean required) {
+        palette.setRequired(required);
+        return super.setRequired(required);
+    }
+
     public static class Builder<T extends Serializable> implements Serializable {
 
         private static final long serialVersionUID = 991248996001040352L;