Hi Martin, The form reloads the entity from the database (it uses a kind of loadable detachable model) at each ajax request, so it does not remember the values for the fields that have been modified in previous requests if we use AjaxForm[Choice]ComponentUpdatingBehavior. This is why we use AjaxFormSubmitBehavior.
We could alter the form somehow to use AjaxForm[Choice]ComponentUpdat ingBehavior, but still... aren't my points valid? On Fri, Feb 8, 2019 at 9:26 PM Martin Grigorov <mgrigo...@apache.org> wrote: > Hi, > > Why do you use AjaxFormSubmitBehavior ? It submits the whole form, i.e. all > its form components. > I think you want to use AjaxForm[Choice]ComponentUpdatingBehavior - it will > submit only the value of the modified field. > > On Fri, Feb 8, 2019 at 2:57 PM mscoon <msc...@gmail.com> wrote: > > > Hi all, > > > > We have an outer form and an inner form. The inner form contains some > form > > components which all have an AjaxFormSubmitBehavior in order to update > each > > - other when the user changes one of them. > > > > The actual submitting button is in the outer form. > > > > When the AjaxFormSubmitBehavior runs and some components are invalid, > > AutoLabelMarker is called and updates the label classes according to the > > component's validation state (valid/invalid) (and also required/enabled > > state). We do not want this to happen because the user is in the process > of > > filling in the form, and we think it's confusing to have the labels of > some > > components change color. This should only happen when the user has > clicked > > the submitting button. > > > > Whats-more the label classes are updated for all form components, > ignoring > > whether the components have been added to the AjaxRequestTarget in > > AjaxFormSubmitBehavior.onSubmit/onError. > > > > Can someone explain the reasoning behind AutoLabelMarker always updating > > all form component labels in every ajax request? Shouldn't labels be > > repainted after the ajax request only if their controls are repainted - > > i.e. added to the AjaxRequestTarget? > > > > Apparently we can remove the AutoLabelMarker from all form components. Is > > this what we should do? Isn't there a cleaner way? > > > > Thanks in advance, > > Marios > > >