my dog learned polymorphism*
The moose likes Struts and the fly likes nested:nest etc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "nested:nest etc" Watch "nested:nest etc" New topic
Author

nested:nest etc

Zane Tofie
Greenhorn

Joined: Jul 02, 2003
Posts: 3
I have a property on a form bean that stores an object that contains an array list.
The array list contains a wrapper object that contains 4 other objects - each of a different type.
I try to access the respective properties of each of the four objects contained in the wrapper object in the following way:
<nested:nest property="propertyList">
<nested:iterate id="objects" property="cachedProperties" indexId="cachedPropertiesIndex">
<TABLE>
<TBODY>
<TR>
<TD><TABLE border="0" width="100%" bgcolor="#ff0000">
<TBODY>
<TR>
<TD nowrap width="10%" bgcolor="#ffffff"><FONT size="1" color="#000000" face="Verdana"><B>
ZAR: <nested:write property="property.formattedPrice"/></B></FONT></TD>
To be precise:
The propertyList property contains the array list and this array list is called cachedProperties.
The array list contains PropCargo objects.
Each propCargo object contains a:
1. Property object
2. Features object
3. Images object
4. Client object
I want to access properties of these objects in the same nested:iterate clause by going something like: property="property.formattedPrice" for example.
Am I doing this correctly or have I missed something?
The HTML table doesn't render.
Help will be greatly appreciated.
Zain
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: nested:nest etc
 
Similar Threads
BeanUtils.populate
nested:iterate problem - no getter method for bean property?
problems with form
formatting problem
Dynamic table generation in jsp