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:30 UTC
[syncope] 02/02: [SYNCOPE-1539] setRequired for AjaxPalettePanel
(#165)
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
commit 342d0b583da7298298419d87cef60589ada2bc1c
Author: DimaAy <di...@tirasa.net>
AuthorDate: Tue Feb 4 09:50:42 2020 +0100
[SYNCOPE-1539] setRequired for AjaxPalettePanel (#165)
---
.../client/ui/commons/markup/html/form/AjaxPalettePanel.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxPalettePanel.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxPalettePanel.java
index 9256e65..abaf193 100644
--- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxPalettePanel.java
+++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxPalettePanel.java
@@ -171,7 +171,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));
@@ -216,6 +216,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;