File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Writting Nested Properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Writting Nested Properties" Watch "Writting Nested Properties" New topic

Writting Nested Properties

Gran Roguismo
Ranch Hand

Joined: Mar 10, 2005
Posts: 77
I'm having issues getting values out of my nested beans.
The structure is like this. I put a subBean into a topBean. I put the topBeans into a Vector and I put that into the request.

in my JSP I get the vector out of session and iterate through it, getting out topBeans. From time to time I want values from inside of those subBeans though. How can I get them without a bunch of scriptlets in the page?

My current clode looks like this:

this however, obviously, is not working. What other tags can I consider? Am I using these improperly? To my thinking that "nested:nest" tag needs a "name" tag to work properly. How can I make sure it's getting it from topBean.

Just to clarify, when I use the <bean:write name='topBean' property='valueName' /> on it's own here I get the Bean type on the screen, not the value I'm looking for.

thanks for your help

Gran Roguismo
Ranch Hand

Joined: Mar 10, 2005
Posts: 77
alright, I got what I needed.
I defined the bean while it was iterating through
I agree. Here's the link:
subject: Writting Nested Properties