You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Francois Armand <fa...@linagora.com> on 2009/03/02 18:23:56 UTC
Re: T5 : how to make input validations during the submission of a
field ?
Stephane Decleire wrote:
> I have implemented a field which is a subclass of abstract field and i
> would like to make input validations during the processSubmission() event.
> Is there a way to get the form component in there to record new errors ?
> Or is there another event where this can be done ?
>
AbstractTextField use the Environnemental Tracker, I think you can do
the same.
=>
@Environmental
private ValidationTracker tracker;
...
protected void processSubmission(String elementName) {
.....
catch (ValidationException ex)
{
tracker.recordError(this, ex.getMessage());
}
....
}
--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
http://fanf42.blogspot.com
InterLDAP - http://interldap.org
FederID - http://www.federid.org/
Open Source identities management and federation
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org