You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sven Homburg <ho...@googlemail.com> on 2010/09/08 20:52:18 UTC

form field validation

Hi there,

i search for a solution for the problem below:

i have a components that includes some form field components.
in one page i want to use this component with sone validations
and in an other page i want to use the same component but with
no validations.

how is the best way to solve this problem?
with component parameters?

with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org

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


Re: form field validation

Posted by Sven Homburg <ho...@googlemail.com>.
hmm, if i use the validation like this:

void onValidateFromCount(Integer value) throws ValidationException
{
    if (value.equals(13)) throw new ValidationException("Thirteen is
an unlucky number.");
}

the Errors-Component of Tapestry displays two errors:

first: org.apache.tapestry5.ValidationException: Thirteen is an unlucky number.
and second: Thirteen is an unlucky number.

is this the desired behavior?


with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org





2010/9/8 Sven Homburg <ho...@googlemail.com>:
> hehe, cool
>
> i cant see the forrest .... there are too many trees in front of
>
> with regards
> Sven Homburg
> Founder of the Chenille Kit Project
> http://chenillekit.codehaus.org
>
>
>
>
>
> 2010/9/8 LLTYK <LL...@mailinator.com>:
>>
>> If you validate server side its easy with onValidateFromSoAndSoField(....).
>> Then you just check your parameter that enables validation and decide
>> whether or not to do it.
>> --
>> View this message in context: http://tapestry-users.832.n2.nabble.com/form-field-validation-tp5511922p5512116.html
>> Sent from the Tapestry Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

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


Re: form field validation

Posted by Sven Homburg <ho...@googlemail.com>.
hehe, cool

i cant see the forrest .... there are too many trees in front of

with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org





2010/9/8 LLTYK <LL...@mailinator.com>:
>
> If you validate server side its easy with onValidateFromSoAndSoField(....).
> Then you just check your parameter that enables validation and decide
> whether or not to do it.
> --
> View this message in context: http://tapestry-users.832.n2.nabble.com/form-field-validation-tp5511922p5512116.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: form field validation

Posted by LLTYK <LL...@mailinator.com>.
If you validate server side its easy with onValidateFromSoAndSoField(....).
Then you just check your parameter that enables validation and decide
whether or not to do it.
-- 
View this message in context: http://tapestry-users.832.n2.nabble.com/form-field-validation-tp5511922p5512116.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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