Hi Stephan,

Thanks for providing this solution. I tried to implement this, but got stuck
on the last step. Could you tell me how you "set the saved controlName to
the component"? I couldn't find a public setter for this property. I
searched the whole class hierarchy for TextField and couldn't find anything.
Do I need to create a wrapper for it? Thanks.

Benny

On Fri, Feb 4, 2011 at 4:30 AM, Stephan Windmüller <
stephan.windmuel...@tu-dortmund.de> wrote:

> On 02.02.2011 16:39, Benny Law wrote:
>
> > Yes, I am doing cross-field validation (e.g. quantity is required if
> another
> > property of the item has a certain value) and that's why it has to be
> done
> > in onValidateForm(), or at least that's what I think.
>
> We have a similar issue in our application. You can solve yours like this:
>
> - Inject the textfield in your page
> - In onValidateFromQuantatiy(String), store quantity.getControlName
>  in a Map
> - In onValidateForm, proceed with your validation. To record an error,
>  set the saved controlName to the component and push it into
>  recordError
>
> HTH
>  Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to