:ajax-submit-on-change? for form-controls always results in innerHTML refresh -- is it needed?
Created by: genworks
As it is currently, if you have a sheet-section with a form-control (a type of base-form-control from gwl/form-elements/source/primitives.lisp), and specify :ajax-submit-on-change? t, this will always result in the inner-html being "dirty" (i.e. :unbound) after the submission, therefore the innerHTML for the sheet-section will be refreshed via Ajax. In case that the form-control itself is the only thing which was modified as a result of the submission, it might not be strictly necessary to refresh the HTML -- after all, the browser already has the correct state.
It has been reported by Reinier van Dijk that this over-zealous updating of the inner-html for the sheet-section sometimes "messes up the UI." On the other hand, allowing the inner-html to update does guarantee that the View (i.e. the content of the web page) will exactly match the Model (i.e. the sheet-section and form-control objects in Gendl). In other words, updating the inner-html acts to confirm for the user that the intended values from the View (browser) were indeed passed successfully into the server (the Model), through the Controller (i.e. the gdlAjax logic).
A self-contained example of how the UI can be "messed up" by the refresh of the inner-html of the sheet-section containing the form-control in question will be of great assistance in determining whether this is behavior which should be changed. In theory, it would be possible to detect when the form-control value is indeed the only thing affected by the Ajax submission, and in that case to suppress the refreshing of the inner-html.
Imported comments:
By genworks on 2013-01-12 22:57:53 UTC
@reiniervandijk you may be interested in following this Issue.