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

Reply via email to