You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christian Haselbach <ch...@tngtech.com> on 2008/09/04 15:31:47 UTC

[T4] Validation Problem

Hi,

I'm using a required validator on a TextField and use the form delegate
to check whether there is an error in the TextField. If so, I render an
error message. However, this message is rendered before the input-field
is rendered.

The problem starts when I have this TextField in a For loop. Now a
validation error message is shown an the next TextField, instead of the
TextField that really has the problem.

Interestingly, if the last TextField is wrong, the first TextField gets
the error message.

Anyone knows a solution?

Thanks and regards,
Christian

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


Re: [T4] Validation Problem

Posted by Christian Haselbach <ch...@tngtech.com>.
Hi again,

a colleague of mine gave me a hint: Look at FieldLabel. FieldLabel
handles exactly the same problem and uses preRender(). I could solve it
analogous.

Regards,
Christian

Christian Haselbach wrote:
> Hi,
>
> I'm using a required validator on a TextField and use the form delegate
> to check whether there is an error in the TextField. If so, I render an
> error message. However, this message is rendered before the input-field
> is rendered.
>
> The problem starts when I have this TextField in a For loop. Now a
> validation error message is shown an the next TextField, instead of the
> TextField that really has the problem.
>
> Interestingly, if the last TextField is wrong, the first TextField gets
> the error message.
>
> Anyone knows a solution?
>
> Thanks and regards,
> Christian
>
> ---------------------------------------------------------------------
> 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