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 2018/07/23 08:21:03 UTC
[2/2] syncope git commit: [SYNCOPE-1342] Missing onblur / onchage on
domain and locale dropdown
[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/ae5a7ff2
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ae5a7ff2
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ae5a7ff2
Branch: refs/heads/master
Commit: ae5a7ff2079610452bc64e7b05519cbfec87839b
Parents: ea46b82
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Jul 23 10:20:38 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Jul 23 10:20:51 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/ae5a7ff2/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"))) {