You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alexandr Kundirenko <ak...@gmail.com> on 2005/09/07 09:44:32 UTC

Re[2]: How to write a customer validator?

You can inject spring bean into page and access page from validator:

public void validate(IFormComponent field, ValidationMessages messages, Object object) throws ValidatorException {
   IPage page = field.getPage();
   ...
}

JT> Thank your reply.
JT> But How to inject spring bean in CustomValidator? I have inject spring bean
JT> from a page using @InjectObject("spring:xx").
JT> Jun Tsai.

JT> On 9/7/05, Ron Piterman <rp...@gmx.net> wrote:
>> 
>> Look at the wiki -> tapestry 4 -> Howtos
>> 
>> 
>> ????? Jun Tsai:
>> > hi,all.
>> > Now I can validate userName@TextField using validators.It can display
>> the
>> > error message .But my system need to check the user who have exist in
>> > database,how to display the message to the userName@TextField component.
>> > Thanks
>> > Jun Tsai
>> >
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> tapestry-user-help@jakarta.apache.org
>> 
>> 





-- 
aku


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