You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andrea Chiumenti <ki...@gmail.com> on 2006/12/09 16:52:46 UTC

Help overriding a service

Hello I need to override FormComponentContributorContext. How can I do ?

Re: Help overriding a service

Posted by Andrea Chiumenti <ki...@gmail.com>.
Thank you Andyhot,
I thought to override the set of validators, despite the fact that I've put
them in the wrong package and I'll need to move them  in another one, I've
figured out a scenario and found that the validators overriding solution
works well for client side validation, but I have to investigate how to
handle server side validation.
Since for JFlyEditGrid I need partial submit, as you have seen from the
first prototype, now the hard work has come from the validation part. The
trick I've thougt is to use tacos AjaxEventSubmit with validation disabled,
on the cli side getting the components and adding to them their validator
functions (for example dojo.byId('my-comp').onvalidate .....)  the via
dojo.event.connect I can handle the validation. Now I need to figure out how
to handle server side validation.
Any thought ?
Ciao,
kiuma

On 12/10/06, andyhot <an...@di.uoa.gr> wrote:
>
> Andrea Chiumenti wrote:
> > Hello I need to override FormComponentContributorContext. How can I do ?
> >
>
> I'm looking at the 4.1 code, but this should also be valid for 4.0
>
> You can't easily override that, because implementations of the interface
> you mentioned
> are directly created within ValidatableFieldSupportImpl and
> TranslatedFieldSupportImpl
>
> So, you have to create your own implementations of those 2 and override
> services
> tapestry.form.TranslatedFieldSupport and
> tapestry.form.ValidatableFieldSupport
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Help overriding a service

Posted by andyhot <an...@di.uoa.gr>.
Andrea Chiumenti wrote:
> Hello I need to override FormComponentContributorContext. How can I do ?
>

I'm looking at the 4.1 code, but this should also be valid for 4.0

You can't easily override that, because implementations of the interface
you mentioned
are directly created within ValidatableFieldSupportImpl and
TranslatedFieldSupportImpl

So, you have to create your own implementations of those 2 and override
services
tapestry.form.TranslatedFieldSupport and
tapestry.form.ValidatableFieldSupport



-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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