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 09:25:32 UTC

[syncope] branch 2_0_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_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_0_X by this push:
     new 2d056cf  [SYNCOPE-1539] setRequired for AjaxPalettePanel (#165)
2d056cf is described below

commit 2d056cfeada21bf3399d0b9914d871500a709fe0
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 54b4288..0810746 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
@@ -175,7 +175,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));
@@ -214,6 +214,12 @@ public class AjaxPalettePanel<T extends Serializable> extends AbstractFieldPanel
         target.add(palette);
     }
 
+    @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;