I meant from some other class (a Component) that had the bean
injected.  That class could then pass its injected dependency into the
validator's constructor.

On Fri, Jun 6, 2008 at 3:53 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> not without manually injecting the validator or making validate an
> inner/anon class so it can access component's fields.
>
> -igor
>
> On Fri, Jun 6, 2008 at 12:46 PM, James Carman
> <[EMAIL PROTECTED]> wrote:
>> You can, however, pass in an object obtained via injection with the
>> @SpringBean annotation.
>>
>> On Fri, Jun 6, 2008 at 3:42 PM, Patrick Angeles <[EMAIL PROTECTED]> wrote:
>>>
>>> Another difference, if you have to do a database roundtrip (which you will
>>> likely need to verify a password) then the code for the validator is a bit
>>> more complicated. You have to take into account the fact that this gets
>>> serialized/deserialized as part of the page so you can't just pass a DB
>>> connection or hibernate session in the constructor.
>>>
>>>
>>>
>>> Eelco Hillenius wrote:
>>>>
>>>>> But can you please explain, why wouldn't you use validator for this?
>>>>
>>>> I think that's just personal preference. Validators are reusable,
>>>> while putting a check in onSubmit isn't. Whether that matters depends
>>>> on your project and the context you do the check in.
>>>>
>>>> Eelco
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context: 
>>> http://www.nabble.com/How-reliable-Validators-are--tp17697642p17699825.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to