You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rama chandrula <rc...@hotmail.com> on 2006/01/31 07:44:49 UTC
Nested Tags
Hi,
I have a list of objects, and each object inturn has a list of another
object. I want to represent all these objects and the properties of the
inner object in the UI like
outer[i].inner[j].propertyValue
How can I use nested tags to do this. Or is there any other solution ??
_________________________________________________________________
NRIs, Free Money Transfers to over 30 Million Visa Cards in India.
http://creative.mediaturf.net/creatives/icicibank/MSN_VISA_TOL.htm
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Nested Tags
Posted by Hubert Rabago <hr...@gmail.com>.
On 1/31/06, rama chandrula <rc...@hotmail.com> wrote:
> I have a list of objects, and each object inturn has a list of another
> object. I want to represent all these objects and the properties of the
> inner object in the UI like
>
> outer[i].inner[j].propertyValue
>
> How can I use nested tags to do this. Or is there any other solution ??
http://www.keyboardmonkey.com/next/index.jsp has tutorials that cover
this. I personally wouldn't do it any other way.
As for the beans themselves... if you don't have form beans for these
objects yet, take a look at FormDef. It can handle the form bean
generation, form population, and bean population for you [1]. There's
a sample app that shows using a bean that nests a collection of beans
that nests another bean [2]. Otherwise, take a look at using
commons-collection's lazyList [3]. I think you can also use the
LazyValidatorForm [4] for this. Search the user list archives on more
about using lazy list and the lazy validator form [5].
Hubert
[1] https://formdef.dev.java.net/
[2] http://www.rabago.net/struts/formdef/downloads.htm
[3] http://jakarta.apache.org/commons/collections/api-release/org/apache/commons/collections/list/LazyList.html
[4] http://struts.apache.org/struts-action/apidocs/org/apache/struts/validator/LazyValidatorForm.html
[5] http://struts.apache.org/mail.html#Archives
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org