You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by al...@orbism.com on 2005/08/17 22:39:04 UTC

showing nested collections in a JSP

Hi All.

I need some help.  I have a collection of objects(A), where each object in that
collection, has a collection of objects(B), then each B has a collection of
objects(C).  What the client wants, is to display the list of A's in a
table with each row having a radio button.  When a radio button is selected,
another table needs to show the collection of B's "owned" by the selected A.
Similarly, when a B is selected from the list by selecting a radio
button, a table showing the collection of C's "owned" by the selected B. Then,
I need to show additional properties if the user selects a C.

I think I can figure out how to display the tables using the nested:XX tags,
but cant figure out how to display the nested collection by radio button. I
guess I need to understand how to "index" a collection dynamiclly.  I know
JSTL is the preferred way, but I'm stuck with only the struts tags to build
this app.

Thanks for any help.

Alan

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


Re: showing nested collections in a JSP

Posted by Tremal Naik <tr...@gmail.com>.
2005/8/17, alewis@orbism.com <al...@orbism.com>:
> I think I can figure out how to display the tables using the nested:XX tags,
> but cant figure out how to display the nested collection by radio button. I
> guess I need to understand how to "index" a collection dynamiclly.  I know
> JSTL is the preferred way, but I'm stuck with only the struts tags to build

Don't know if I undeerstood well your need, but I would use client
logic, as javascript functions, to realize this behaviour. Why don't
make use of the 'style' property of visual elements to hide/display
them depending on radio button clicking events?

-- 
TREMALNAIK

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