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

skylark17 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 14d274c  [SYNCOPE-1505] Changes to AjaxPalettePanel components in 
Console are now saved when the previous step button is before submitting the 
wizard form
14d274c is described below

commit 14d274c720473981fe6ef6a7587b45c21972586f
Author: Matteo Alessandroni <matteo.alessandr...@tirasa.net>
AuthorDate: Thu Nov 7 16:14:24 2019 +0100

    [SYNCOPE-1505] Changes to AjaxPalettePanel components in Console are now 
saved when the previous step button is before submitting the wizard form
---
 .../console/wicket/markup/html/form/AjaxPalettePanel.java | 15 ++++++++++++++-
 1 file changed, 14 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 ac55d4b..54b4288 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
@@ -29,6 +29,8 @@ import java.util.Map;
 import java.util.regex.Pattern;
 import org.apache.commons.collections4.ListUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import 
org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.Component;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
@@ -109,7 +111,7 @@ public class AjaxPalettePanel<T extends Serializable> 
extends AbstractFieldPanel
 
             @Override
             protected Recorder<T> newRecorderComponent() {
-                return new Recorder<T>("recorder", this) {
+                Recorder<T> recorder = new Recorder<T>("recorder", this) {
 
                     private static final long serialVersionUID = 
-9169109967480083523L;
 
@@ -159,6 +161,17 @@ public class AjaxPalettePanel<T extends Serializable> 
extends AbstractFieldPanel
                         return selected;
                     }
                 };
+                recorder.add(new 
IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+                    private static final long serialVersionUID = 
-6139318907146065915L;
+
+                    @Override
+                    protected void onUpdate(final AjaxRequestTarget target) {
+                        processInput();
+                    }
+                });
+
+                return recorder;
             }
         };
 

Reply via email to