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

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new c5b40ba  ISIS-2834: just comments (as we gained more insight)
c5b40ba is described below

commit c5b40bae157ed18e953812d6e3f7dbedc57bfa60
Author: Andi Huber <[email protected]>
AuthorDate: Mon Aug 16 11:14:15 2021 +0200

    ISIS-2834: just comments (as we gained more insight)
---
 .../scalars/datepicker/TextFieldWithDateTimePicker.java       | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git 
a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
 
b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
index 578880a..9021fab 100644
--- 
a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
+++ 
b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
@@ -97,15 +97,16 @@ public class TextFieldWithDateTimePicker<T> extends 
TextField<T> implements ICon
 
         this.config = config;
 
-        //XXX ISIS-2834 as a side-effect ...
+        //XXX ISIS-2834 
+        //Adding OnChangeAjaxBehavior registers a JavaScript event listener on 
change event. 
+        //Since OnChangeAjaxBehavior extends AjaxFormComponentUpdatingBehavior 
the Ajax request 
+        // also updates the Wicket model for this form component on the server 
side.  
+        // onUpdate() is a callback method that you could use to do something 
more or don't do anything 
         add(new OnChangeAjaxBehavior() {
             private static final long serialVersionUID = 1L;
             @Override
             protected void onUpdate(AjaxRequestTarget target) {
-                // ... 
org.apache.isis.viewer.wicket.ui.components.scalars.datepicker.TextFieldWithDateTimePicker
-                // which extends 
org.apache.wicket.markup.html.form.FormComponent
-                // triggers FormComponent#updateModel(), which otherwise would 
not be called
-                // (which is totally strange behavior)
+                // nothing to do
             }
         });
     }

Reply via email to