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:39 UTC

[syncope] branch 2_1_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_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_1_X by this push:
     new de1a909  Fixing weird behavior with autocomplete and search by clicking on magnifier icon
de1a909 is described below

commit de1a9096c2b752edd2cdc00b5fc24836ae35221c
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     | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 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 1e7acfc..e567cfb 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,7 +55,7 @@ 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;
@@ -155,7 +155,7 @@ public class SearchClausePanel extends FieldPanel<SearchClause> {
 
     private final Fragment searchButtonFragment;
 
-    private final AjaxSubmitLink searchButton;
+    private final AjaxLink<Void> searchButton;
 
     private IEventSink resultContainer;
 
@@ -189,14 +189,14 @@ public class SearchClausePanel extends FieldPanel<SearchClause> {
         this.privilegeNames = privilegeNames;
         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) {
+            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));
                 }
@@ -213,7 +213,6 @@ public class SearchClausePanel extends FieldPanel<SearchClause> {
             private static final long serialVersionUID = -8204140666393922700L;
 
         };
-
         add(field);
 
         comparators = new LoadableDetachableModel<List<Comparator>>() {
@@ -420,7 +419,7 @@ public class SearchClausePanel extends FieldPanel<SearchClause> {
         }
 
         AjaxTextFieldPanel property = new AjaxTextFieldPanel(
-                "property", "property", new PropertyModel<>(searchClause, "property"), true) ;
+                "property", "property", new PropertyModel<>(searchClause, "property"), true);
         property.hideLabel().setOutputMarkupId(true).setEnabled(true);
         property.setChoices(properties.getObject());
         field.add(property);