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

ilgrosso pushed a commit to branch 3_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/3_0_X by this push:
     new ba3bfb0c63 [SYNCOPE-1920] fixes ClassCastException while adding Long 
condition in search panel (#1211)
ba3bfb0c63 is described below

commit ba3bfb0c633d4de6b48e47e799523669339432a0
Author: Andrea Patricelli <[email protected]>
AuthorDate: Thu Oct 16 08:47:17 2025 +0200

    [SYNCOPE-1920] fixes ClassCastException while adding Long condition in 
search panel (#1211)
---
 .../client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java
 
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java
index 39c6824b59..c26c889717 100644
--- 
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java
+++ 
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java
@@ -37,6 +37,7 @@ import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.util.lang.Objects;
 
 public final class AjaxNumberFieldPanel<T extends Number & Comparable<T>> 
extends FieldPanel<T> {
 
@@ -74,7 +75,13 @@ public final class AjaxNumberFieldPanel<T extends Number & 
Comparable<T>> extend
         this.enableOnChange = enableOnChange;
         this.convertValuesToString = convertValuesToString;
 
-        field = new NumberTextField<>("numberTextField", model, reference, 
options);
+        field = new NumberTextField<>("numberTextField", model, reference, 
options) {
+            @Override
+            protected String getModelValue() {
+                Object value = getModelObject();
+                return value == null ? "" : Objects.stringValue(value);
+            }
+        };
 
         if (enableOnChange && !isReadOnly()) {
             field.add(new 
IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {

Reply via email to