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/05/12 15:19:43 UTC

[syncope] branch 2_0_X updated: Fixing weird behavior with autocomplete and search by clicking on magnifier icon

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 d75f2b8  Fixing weird behavior with autocomplete and search by clicking on magnifier icon
d75f2b8 is described below

commit d75f2b86350bcf01fb071e0f0a57c56878a93d64
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Tue May 12 17:12:46 2020 +0200

    Fixing weird behavior with autocomplete and search by clicking on magnifier icon
---
 .../client/console/panels/search/SearchClausePanel.java | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/SearchClausePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/SearchClausePanel.java
index aca3887..b24cb97 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/SearchClausePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/SearchClausePanel.java
@@ -55,13 +55,12 @@ import org.apache.wicket.ajax.AjaxEventBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.attributes.AjaxCallListener;
 import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
-import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.event.Broadcast;
 import org.apache.wicket.event.IEventSink;
 import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.CheckBox;
-import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.markup.html.form.IChoiceRenderer;
 import org.apache.wicket.markup.html.list.ListItem;
@@ -99,7 +98,7 @@ public class SearchClausePanel extends FieldPanel<SearchClause> {
 
     private final Fragment searchButtonFragment;
 
-    private final AjaxSubmitLink searchButton;
+    private final AjaxLink<Void> searchButton;
 
     private IEventSink resultContainer;
 
@@ -129,14 +128,14 @@ public class SearchClausePanel extends FieldPanel<SearchClause> {
         this.roleNames = roleNames;
         this.resourceNames = resourceNames;
 
-        searchButton = new AjaxSubmitLink("search") {
+        searchButton = new AjaxLink<Void>("search") {
 
             private static final long serialVersionUID = 5538299138211283825L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+            public void onClick(final AjaxRequestTarget target) {
                 if (resultContainer == null) {
-                    send(this, Broadcast.BUBBLE, new SearchEvent(target));
+                    send(SearchClausePanel.this, Broadcast.BUBBLE, new SearchEvent(target));
                 } else {
                     send(resultContainer, Broadcast.EXACT, new SearchEvent(target));
                 }
@@ -153,7 +152,6 @@ public class SearchClausePanel extends FieldPanel<SearchClause> {
             private static final long serialVersionUID = -8204140666393922700L;
 
         };
-
         add(field);
 
         comparators = new LoadableDetachableModel<List<Comparator>>() {
@@ -369,10 +367,7 @@ public class SearchClausePanel extends FieldPanel<SearchClause> {
         }
 
         final AjaxTextFieldPanel property = new AjaxTextFieldPanel(
-                "property",
-                "property",
-                new PropertyModel<String>(searchClause, "property"),
-                false);
+                "property", "property", new PropertyModel<String>(searchClause, "property"), true);
         property.hideLabel().setOutputMarkupId(true).setEnabled(true);
         property.setChoices(properties.getObject());
         field.add(property);