You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Julien Leonard <jl...@gmail.com> on 2007/05/21 15:33:08 UTC

[S2] Validation on datetimepicker

Hello all,

I'm using a datetimepicker in a search form, the result of the form is
displayed in a s:div (thanks theme="ajax" on s:submit ).
My problem is, when the user set a wrong value in the datetimepicker (
"toto"), the s:div is updated but with the error page. In fact it's another
form with a header etc...

How can I validate the date to have the error message on the first form?

Julien

Re: [S2] Validation on datetimepicker

Posted by Musachy Barroso <mu...@gmail.com>.
You can use the notify topics to validate the date and cancel the request if
the date is not valid. On 2.0.6 I don't think there is any way to get Struts
do it for you. On 2.1 you can mix ajax with validation so any validation
supported by struts can be used with the ajax tags.

musachy

On 5/21/07, Julien Leonard <jl...@gmail.com> wrote:
>
> Hello all,
>
> I'm using a datetimepicker in a search form, the result of the form is
> displayed in a s:div (thanks theme="ajax" on s:submit ).
> My problem is, when the user set a wrong value in the datetimepicker (
> "toto"), the s:div is updated but with the error page. In fact it's
> another
> form with a header etc...
>
> How can I validate the date to have the error message on the first form?
>
> Julien
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd