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 <[EMAIL PROTECTED]> wrote:
>>
>> Look at the wiki -> tapestry 4 -> Howtos
>>
>>
>> ????? Jun Tsai:
>> > hi,all.
>> > Now I can validate [EMAIL PROTECTED] 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 [EMAIL PROTECTED] component.
>> > Thanks
>> > Jun Tsai
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>>
>>
--
aku
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]