commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Kleineikenscheidt" <stefan.t...@kleineikenscheidt.de>
Subject RE: [Jelly] Define Beans
Date Sat, 14 Aug 2004 09:03:48 GMT

Thanks, that did the trick!  :)

-Stefan



> -----Original Message-----
> From: Dion Gillard [mailto:dion.gillard@gmail.com] 
> Sent: Friday, August 13, 2004 2:01 AM
> To: Jakarta Commons Users List
> Subject: Re: [Jelly] Define Beans
> 
> 
> On Fri, 13 Aug 2004 00:39:35 +0200, Stefan Kleineikenscheidt
> <stefan.tech@kleineikenscheidt.de> wrote:
> > 
> > Hello,
> > 
> > I would like to create a bean, which has a complex 
> property.  My Jelly
> > script looks something like that, but it doesn't work:
> > 
> > ---%<------------------------------------
> > 
> >   <define:taglib uri="mytaglib">
> >     <define:jellybean
> >       name="beanA"
> >       className="package.name.BeanA"
> >       method="execute" />
> > 
> >     <define:bean
> >       name="beanB"
> >       className="package.name.BeanB" />
> >   </define:taglib>
> > 
> >   <goal name="hello">
> > 
> >     <mytaglib:beanB
> >         var="mybeanb" />
> > 
> >     <mytaglib:beanA
> >         var="myConverter"
> >         propertyOfTypeBeanB="mybeanb" />  **)
> >   ....
> > 
> > ---%<------------------------------------
> > 
> > **) Jelly tries to set 'mybeanb' as String to 'propertyOfTypeBeanB',
> > which results in an IllegalArgumentException.
> 
> And so it should.
> 
> Defining a bean as part of a taglib means that it will call the
> execute method when the tag is executing.
> 
> > Is there a way to do something like that with Jelly?
> If you'd like to create a bean, and store it in a property, the
> useBean tag 
> http://jakarta.apache.org/commons/jelly/tags.html#core:useBean

is more appropriate.

-- 
http://www.multitask.com.au/people/dion/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message