My suspicion is that you can get a reference to the validator in Java
code, , get a reference to the Bean in java code, then write a method
that returns a collection containing both, and then call that method
via ognl or prop and pass it to the validators binding.  I don't think
you can combine bean and validator references the way you want to.

--sam


On 4/2/07, Hugo Palma <[EMAIL PROTECTED]> wrote:
It's possible to inject page beans because the following works just fine:

<binding name="validators" value="bean:refmbValidator"/>

I just can't inject the required validator also.

On 4/2/07, Martino Piccinato <[EMAIL PROTECTED]> wrote:
>
> I think you can inject some also in the "validators" name binding syntax.
> Like you do for min/max validators and such.
> Don't know if it's possible to inject page beans as you would like. I'm
> curious too then :-)
>
> On 4/2/07, Hugo Palma <[EMAIL PROTECTED]> wrote:
> >
> > I'm pretty sure i can use the bean directly without contributing it to
> the
> > application validators. I don't want to contribute because i want to
> > inject
> > some properties into the validator bean in the page descriptor.
> > I can assign each validator on it's own, i just can't assign both...
> >
> > On 4/2/07, Martino Piccinato <[EMAIL PROTECTED]> wrote:
> > >
> > > You have to define your validators beans in the hivemodule tapestry
> > > contribution
> > >
> > >    <contribution configuration-id="
> tapestry.form.translator.Translators
> > ">
> > >         <bean name="myValidator" class="my.MyValidator" />
> > >    </contribution>
> > >
> > > Then you can use the bean name directly in the binding as you do with
> > > other
> > > tapestry default validators.
> > >
> > > On 4/2/07, Hugo Palma <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi all,
> > > >
> > > > i would like to use two validators in a TextField where one of the
> > > > validator
> > > > is defined as a bean in the page. I can't figure out the correct
> > syntax
> > > to
> > > > use in the page spec for this. I've tried:
> > > >
> > > > <binding name="validators"
> value="validators:required[%required-field]
> > > > bean:refmbValidator"/>
> > > >
> > > > and
> > > >
> > > > <binding name="validators"
> > value="validators:required[%required-field],
> > > > bean:refmbValidator"/>
> > > >
> > > > and lots others with no success...
> > > > Any ideas would be great.
> > > >
> > > > Thanks....
> > > >
> > >
> >
>


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

Reply via email to