You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by phaedoland <ph...@gmail.com> on 2011/07/26 19:02:28 UTC

Validation problem - OnError event everytime I submit

Hello everyone,

I'm a newbie using this wicket framework. I'm developing a user registration
form, which works quite fine. But when it comes to validate certain fields,
there is no way to have this form behaving as I wish.

My textfields are simple *TextField<String>* and some of them have the
*setRequired *set to true. I also have an *AjaxButton *which submits the
form. To show the validation messages, I use the *FeedbackPanel*, but I want
to show a message next to each invalid field.

This button has the the *onSubmit *and *onError *methods overriden.

The thing is, once I submit the form and there is a validation error, even
if I fulfill all the fields, I get the same error. (onError method is always
called). 

Please, could you help me?

Thank you very much.

Daniel.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-problem-OnError-event-everytime-I-submit-tp3696379p3696379.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Validation problem - OnError event everytime I submit

Posted by phaedoland <ph...@gmail.com>.
Hi!!

Everything related to the Panel was okay. The only thing that happened in
this case was, we had the  override the cleanupFeedbackMessages() method
overriden in our own Session class, and did not call the
super.cleanupFeedbackMessages(). 

Everything is fine, now. This situation was driving me crazy.

Thanks for your reply, Jeremy. I really appreciate.

Cheers,

Daniel.



jeremy@wickettraining.com wrote:
> 
> Are you adding the feedback panel to the ajax request target in,both
> onSubmit and onError?  If so, it should tell you what error is making you
> get to the onError method.
>  On 2011 7 27 21:50, "phaedoland" &lt;phaedoland@gmail.com&gt; wrote:
>> Hello everyone,
>>
>> I'm a newbie using this wicket framework. I'm developing a user
> registration
>> form, which works quite fine. But when it comes to validate certain
> fields,
>> there is no way to have this form behaving as I wish.
>>
>> My textfields are simple *TextField<String>* and some of them have the
>> *setRequired *set to true. I also have an *AjaxButton *which submits the
>> form. To show the validation messages, I use the *FeedbackPanel*, but I
> want
>> to show a message next to each invalid field.
>>
>> This button has the the *onSubmit *and *onError *methods overriden.
>>
>> The thing is, once I submit the form and there is a validation error,
>> even
>> if I fulfill all the fields, I get the same error. (onError method is
> always
>> called).
>>
>> Please, could you help me?
>>
>> Thank you very much.
>>
>> Daniel.
>>
>>
>> --
>> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Validation-problem-OnError-event-everytime-I-submit-tp3696379p3696379.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
> 


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-problem-OnError-event-everytime-I-submit-tp3696379p3716491.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Validation problem - OnError event everytime I submit

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Are you adding the feedback panel to the ajax request target in,both
onSubmit and onError?  If so, it should tell you what error is making you
get to the onError method.
 On 2011 7 27 21:50, "phaedoland" <ph...@gmail.com> wrote:
> Hello everyone,
>
> I'm a newbie using this wicket framework. I'm developing a user
registration
> form, which works quite fine. But when it comes to validate certain
fields,
> there is no way to have this form behaving as I wish.
>
> My textfields are simple *TextField<String>* and some of them have the
> *setRequired *set to true. I also have an *AjaxButton *which submits the
> form. To show the validation messages, I use the *FeedbackPanel*, but I
want
> to show a message next to each invalid field.
>
> This button has the the *onSubmit *and *onError *methods overriden.
>
> The thing is, once I submit the form and there is a validation error, even
> if I fulfill all the fields, I get the same error. (onError method is
always
> called).
>
> Please, could you help me?
>
> Thank you very much.
>
> Daniel.
>
>
> --
> View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Validation-problem-OnError-event-everytime-I-submit-tp3696379p3696379.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>