You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tim Dudgeon <tj...@informaticsmatters.com> on 2004/12/28 19:35:15 UTC

[jelly] define:jellyBean with nested properties

I see how to define a jellybean using simple  properties that can be 
defined as atributes of the  tag e.g.

<define:taglib uri="myTagLib">
    <define:jellybean name="foo" className="MyTask"/>
  </define:taglib>

  
  <my:foo x="2" y="cheese"/>


What about if the class that is my jellyBean neeed more complex 
properties. Is there a way to set these? The bean tag library provides a 
nicve way of specifying these on a plain java bean, but what is the way 
to do this for a jellyBean?

Lets assume my jellyBean class, Foo.java  has property bar that was of 
type Bar.java which had a name and location property.

<define:taglib uri="myTagLib">
    <define:jellybean name="foo" className="Foo"/>
</define:taglib>

<my:foo>
  <bar name="my name" location="somewhere">
</my:foo>


or even, to take it to another stage:



<my:foo>
  <bar name="my name">
	<location street="High Street" city="London"/>
  </bar>
</my:foo>



Tim


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


Re: [jelly] define:jellyBean with nested properties

Posted by Dion Gillard <di...@gmail.com>.
The ant taglibrary provides facilities for doing this style of nested
tag evaluation with beans.


On Tue, 28 Dec 2004 18:35:15 +0000, Tim Dudgeon
<tj...@informaticsmatters.com> wrote:
> I see how to define a jellybean using simple  properties that can be
> defined as atributes of the  tag e.g.
> 
> <define:taglib uri="myTagLib">
>     <define:jellybean name="foo" className="MyTask"/>
>   </define:taglib>
> 
>   <my:foo x="2" y="cheese"/>
> 
> What about if the class that is my jellyBean neeed more complex
> properties. Is there a way to set these? The bean tag library provides a
> nicve way of specifying these on a plain java bean, but what is the way
> to do this for a jellyBean?
> 
> Lets assume my jellyBean class, Foo.java  has property bar that was of
> type Bar.java which had a name and location property.
> 
> <define:taglib uri="myTagLib">
>     <define:jellybean name="foo" className="Foo"/>
> </define:taglib>
> 
> <my:foo>
>   <bar name="my name" location="somewhere">
> </my:foo>
> 
> or even, to take it to another stage:
> 
> <my:foo>
>   <bar name="my name">
>         <location street="High Street" city="London"/>
>   </bar>
> </my:foo>
> 
> Tim
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


-- 
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