forms are not allowed to be direct children of <tr>:

        <form wicket:id="form">


After the first ajax request the browser will reshuffle the dom elements, so that the form is no longer the parent of the input field:

<form action="./?9-1.IFormSubmitListener-AddItemPanelEdit-form" method="post" id="form25" wicket:id="form"></form>

<input type="checkbox" id="onOff28" name="onOff" checked="checked" wicket:id="onOff">


Have fun

On 03.07.2015 00:23, Francois Meillet wrote:
Wicket version is 7.0.M6

Le 2 juil. 2015 à 23:47, Francois Meillet <francois.meil...@gmail.com> a écrit :

In the quickstart, the HomePage contains a form.

The form's model is a CompoundPropertyModel<>(new QuestionUnit(Boolean.TRUE));
The QuestionUnit class has 2 properties, one is mandatory (string 'question').
Properties use validation annotations.

The validation is done with javax.validation.Validator,
so a call to BeanValidationConfiguration().configure(this) is done in the 
application init.

The form contains 2 formcomponents (1 TextField 'question' mandatory and 1 
CheckBox 'onoff' ) + 1 FeedbackLabel (extends Label).
If an error occurs when the form is submitted, a call from within the 
AjaxButton's onError method
to the FormFieldEnlighter helper class is done.

The FormFieldEnlighter updates the FeedbackLabel's model's value,
and add an AttributeModifier to the TextField to modify the 'title' attribute.
Then the textfield and the feedbackLabel are resent via ajax.

When this form is submitted, for the first time, with nothing typed, an error 
Which is normal.
The FeedbackLabel displays an error message.

If some characters are typed in the textfield and the form submitted again,
the textfield is still invalid.
Which is the problem.

But if, at the first submit with the error, the helper class FormFieldEnlighter 
does not resent the invalid textfield,
the second submit works correctly, the form is valid and the ResultPage is 

What I have found
Looking at FormComponent - line 755
List<StringValue> list = 
list is null
The textfield id is not in the parameters name.

mac osx / jdk 8 / safari & firefox

Thanks for your help


To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to