You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Julio C. Rivera" <Ju...@carm.es> on 2003/12/05 08:15:25 UTC
Re: Never mind that last question
You can do something like this:
public void onFormSubmit(IRequestCycle cycle) {
ValidationDelegate delegate =
(ValidationDelegate) getBeans().getBean("delegate");
if (someErrorCondition) {
delegate.record(
"You have to insert some value.",
ValidationConstraint.REQUIRED);
}
else {
//Process submit
}
}
Regards
Julio.
At 07:51 05/12/2003, you wrote:
>I can see an example in the ValidField component help.
>
>One other related question though.
>
>If I want to trigger a validation message manually in my submit function
>is there an easy way to do this?
>
>Regards,
>
>
>Glen Stampoultzis
>gstamp@iinet.net.au
>http://members.iinet.net.au/~gstamp/glen/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
*************************************************
Julio C. Rivera Riquelme
Unidad de Informática
Gerencia de Atención Primaria de Murcia
C\ Escultor Sanchez Lozano, 7
*************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org