Trim single line text input in forms
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 27 Oct 2023 06:20:45 +0000 (08:20 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 27 Oct 2023 06:20:45 +0000 (08:20 +0200)
swt/org.argeo.app.swt/src/org/argeo/app/swt/ux/SuiteSwtUtils.java

index c5aacd6af6303142e983b66bdc790f7ee58a580a..66e84633a97037b7443aae84ad93808663806e51 100644 (file)
@@ -298,7 +298,7 @@ public class SuiteSwtUtils {
                Text txt = SuiteSwtUtils.addFormTextField(parent, text, null, 0);
                if (cmsEditable != null && cmsEditable.isEditing()) {
                        txt.addModifyListener((e) -> {
-                               content.put(property, txt.getText());
+                               content.put(property, txt.getText().trim());
                        });
                } else {
                        txt.setEditable(false);