Ah, yeah. *That's* why it didn't override IClusterable; I was already
wondering that. Sorry for breaking; I'll keep it in mind from now on
(maybe an extra comment wouldn't hurt).

Eelco


On 5/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
i changed ivalidator extends iclusterable to extends serializable, that way
we do not break decoupling. if it needs an extra line in terracotta config
then so be it.

-igor


On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
> I just committed the first pass without what you proposed yet. Maybe
> you can take a look at that Igor?
>
> I kept the mechanism as simple as I could. At a later stage, we can
> see whether we need to optimize (e.g. by not keeping references to the
> behaviors) though the simplicity of this solution has something going
> for it as well.
>
> Eelco
>
> On 5/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > what about making iformvalidator extend ivalidator. and
> ibehaviorprovider
> > extend ivalidator.
> >
> > in formvalidator validatable.value can be form.modelobject() and
> > validatable.error reports an error on form.
> >
> > -igor
> >
> >
> > On 5/9/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > >
> > > > no. dont forget that the idea of IValidator is to be decoupled from
> > > wicket,
> > > > to allow the reuse of validators in service layer. i do that all the
> > > time
> > > > now and it rocks! my service layer and my ui layer are validated by
> the
> > > same
> > > > code. adding ivalidator.getbehavior() will break all that nice
> > > decoupling.
> > > >
> > > > i always thought that something like this would work
> > > >
> > > > IClientSideValidator extends IValidator { /** rerturn a js func to
> > > validate
> > > > the value */ CharSequence getValidationScript(); }
> > >
> > > /**
> > > * Validator that provides a behavior, e.g. for rendering client-side
> or
> > > ajax
> > > * validation. This interface can be implemented by either
> > > * [EMAIL PROTECTED] IValidator validators} or [EMAIL PROTECTED] 
IFormValidator form
> validators}.
> > > */
> > > public interface IBehaviorProvider extends IClusterable
> > > {
> > >         /**
> > >          * Gets behavior for validation.
> > >          *
> > >          * @param component
> > >          *            component currently using the validator
> > >          * @return The behavior, which can be used for rendering e.g.
> > >          */
> > >         IBehavior getValidationBehavior(Component component);
> > > }
> > >
> > > same here, instanceof check and ready. Not extra code as how to
> > > interpret it, and all the flexibility that behaviors provide.
> > >
> > > Eelco
> > >
> >
>

Reply via email to