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

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

commit 3bcfaf2661eeb0ac1284895c5b9d6f3240c184d6
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)
---
 .../ui/commons/markup/html/form/AjaxNumberFieldPanel.java     | 11 ++++++++++-
 1 file changed, 10 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 81e1b612f9..c43905ade1 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
@@ -74,7 +74,16 @@ 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) {
+
+            private static final long serialVersionUID = -8837755342786762653L;
+
+            @Override
+            protected String getModelValue() {
+                T value = getModelObject();
+                return value == null ? "" : value.toString().trim();
+            }
+        };
 
         if (enableOnChange && !isReadOnly()) {
             field.add(new 
IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {

Reply via email to