You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Riccardo Ruffilli <ri...@mapsengineering.com> on 2008/03/12 11:35:47 UTC
T5 validator question
Hi All,
I'm working on validator class in my t5 application, and I've defined my own
validator
that implements Validator<Void, Object> I've registred them like t5
contribution in
my AppModule.java and then I can use them easily in my tag with the
parameter validator="validate:myownvalidator".
With the validate prefix I've noticed that t5 obtain a FieldValidatorImpl
that contains myvalidator
instance like _validate internal property.
I'd like to modelize my component to make it working without any template
explicit parameter
using a model class that wrap all my tag parameter in that way
<t:mycomponent t:mymodel="prop:componentModel" />
instead of
<t:mycomponent t:par1="prop:par1Value" t:par2="prop:par2Value" ..../>
and at rendering time My component get all that values from the model
specified.
That works fine exept for validator parameter because I need to obtain myown
FieldValidatorImpl
instance.
Any ideas about that ?
Many thanks in advance.
-Rick
--
View this message in context: http://www.nabble.com/T5-validator-question-tp16001442p16001442.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 validator question
Posted by Riccardo Ruffilli <ri...@mapsengineering.com>.
I've already found my answer in the magical
@Inject
private FieldValidatorSource _fieldValidatorSource;
with the
_fieldValidatorSource.createValidator(this, "myRegistredValidator", null);
everything works fine !
Bye
-Rick
Riccardo Ruffilli wrote:
>
> Hi All,
>
> I'm working on validator class in my t5 application, and I've defined my
> own validator
> that implements Validator<Void, Object> I've registred them like t5
> contribution in
> my AppModule.java and then I can use them easily in my tag with the
> parameter validator="validate:myownvalidator".
>
> With the validate prefix I've noticed that t5 obtain a FieldValidatorImpl
> that contains myvalidator
> instance like _validate internal property.
> I'd like to modelize my component to make it working without any template
> explicit parameter
> using a model class that wrap all my tag parameter in that way
>
> <t:mycomponent t:mymodel="prop:componentModel" />
>
> instead of
>
> <t:mycomponent t:par1="prop:par1Value" t:par2="prop:par2Value" ..../>
>
> and at rendering time My component get all that values from the model
> specified.
> That works fine exept for validator parameter because I need to obtain
> myown FieldValidatorImpl
> instance.
>
> Any ideas about that ?
>
> Many thanks in advance.
>
> -Rick
>
>
>
>
--
View this message in context: http://www.nabble.com/T5-validator-question-tp16001442p16001764.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org