Repository: syncope
Updated Branches:
  refs/heads/2_1_X 90aa804eb -> 541117a52
  refs/heads/master ea46b82b7 -> ae5a7ff20


[SYNCOPE-1342] Missing onblur / onchage on domain and locale dropdown


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/541117a5
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/541117a5
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/541117a5

Branch: refs/heads/2_1_X
Commit: 541117a520fbdf3365f0a693bebec89cefeb542d
Parents: 90aa804
Author: Francesco Chicchiriccò <ilgro...@apache.org>
Authored: Mon Jul 23 10:20:38 2018 +0200
Committer: Francesco Chicchiriccò <ilgro...@apache.org>
Committed: Mon Jul 23 10:20:38 2018 +0200

----------------------------------------------------------------------
 .../syncope/client/console/pages/Login.java     | 44 ++++++++++++++++----
 1 file changed, 37 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/541117a5/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
index 796408e..488494d 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
@@ -31,13 +31,13 @@ import 
org.apache.syncope.client.console.init.ConsoleInitializer;
 import org.apache.syncope.client.console.panels.NotificationPanel;
 import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.authentication.IAuthenticationStrategy;
 import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.ChoiceRenderer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.PasswordTextField;
 import org.apache.wicket.markup.html.form.StatelessForm;
 import org.apache.wicket.markup.html.form.TextField;
@@ -64,10 +64,6 @@ public class Login extends WebPage {
 
     private final TextField<String> passwordField;
 
-    private final DropDownChoice<Locale> languageSelect;
-
-    private final DropDownChoice<String> domainSelect;
-
     public Login(final PageParameters parameters) {
         super(parameters);
         setStatelessHint(true);
@@ -94,13 +90,47 @@ public class Login extends WebPage {
         passwordField.setMarkupId("password");
         form.add(passwordField);
 
-        languageSelect = new LocaleDropDown("language");
+        LocaleDropDown languageSelect = new LocaleDropDown("language");
+        languageSelect.add(new 
AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                // nothing to do
+            }
+        }).add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                // nothing to do
+            }
+        });
         form.add(languageSelect);
 
-        domainSelect = new DomainDropDown("domain");
+        DomainDropDown domainSelect = new DomainDropDown("domain");
         if (SyncopeConsoleApplication.get().getDomains().size() == 1) {
             domainSelect.setOutputMarkupPlaceholderTag(true);
         }
+        domainSelect.add(new 
AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                // nothing to do
+            }
+        }).add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                // nothing to do
+            }
+        });
         form.add(domainSelect);
 
         AjaxButton submitButton = new AjaxButton("submit", new 
Model<>(getString("submit"))) {

Reply via email to