jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes indexed property problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "indexed property problem" Watch "indexed property problem" New topic
Author

indexed property problem

danny liu
Ranch Hand

Joined: Jan 22, 2004
Posts: 185
Here is a little bit tricky case. The form structure is as below.
claimForm
----- claimInfo
--- replacementInfo
---replacementList
-----replacementItem
.....
-----replacementItem

I want display the replacement items with full path.

Here is my nested approach

<nested:root name="claimForm">
<nested:nest property="claimInfo.replacementInfo" >
<nested efine id="dropdown" property="manufacturerList"/>
<nested:iterate property="replacementList" id="replacementItem">

<tr><td>
<nested:select name="replacementItem" property="manufacturer" indexed="true">
<option value="">Select Manufacturer</option>
<html ptions collection="dropdown" property="manufacturerName"/>
</nested:select>
</td>
<td>
<nested:text name="replacementItem" property="model" indexed="true"/>
</td>
<td>
<nested:text name="replacementItem" property="seer" indexed="true"/>
</td></tr>


</nested:iterate>

</nested:nest>
</nested:root>

Here is the result



<tr><td>
<select name="replacementItem[0].manufacturer"><option value="">Select Manufacturer</option>
<option value="American Standard">American Standard</option>
<option value="Bryant">Bryant</option>
<option value="Carrier">Carrier</option>
<option value="Goodman">Goodman</option>
<option value="Lennox">Lennox</option>
<option value="Other">Other</option>
<option value="Rheem">Rheem</option>
<option value="Ruud">Ruud</option>
<option value="Trane">Trane</option>
<option value="York">York</option></select>
</td>
<td>
<input type="text" name="replacementItem[0].model" value="">
</td>
<td>
<input type="text" name="replacementItem[0].seer" value="">
</td></tr>




<tr><td>
<select name="replacementItem[1].manufacturer"><option value="">Select Manufacturer</option>
<option value="American Standard">American Standard</option>
<option value="Bryant">Bryant</option>
<option value="Carrier">Carrier</option>
<option value="Goodman">Goodman</option>
<option value="Lennox">Lennox</option>
<option value="Other">Other</option>
<option value="Rheem">Rheem</option>
<option value="Ruud">Ruud</option>
<option value="Trane">Trane</option>
<option value="York">York</option></select>
</td>
<td>
<input type="text" name="replacementItem[1].model" value="">
</td>
<td>
<input type="text" name="replacementItem[1].seer" value="">
</td></tr>




<tr><td>
<select name="replacementItem[2].manufacturer"><option value="">Select Manufacturer</option>
<option value="American Standard">American Standard</option>
<option value="Bryant">Bryant</option>
<option value="Carrier">Carrier</option>
<option value="Goodman">Goodman</option>
<option value="Lennox">Lennox</option>
<option value="Other">Other</option>
<option value="Rheem">Rheem</option>
<option value="Ruud">Ruud</option>
<option value="Trane">Trane</option>
<option value="York">York</option></select>
</td>
<td>
<input type="text" name="replacementItem[2].model" value="">
</td>
<td>
<input type="text" name="replacementItem[2].seer" value="">
</td></tr>




<tr><td>
<select name="replacementItem[3].manufacturer"><option value="">Select Manufacturer</option>
<option value="American Standard">American Standard</option>
<option value="Bryant">Bryant</option>
<option value="Carrier">Carrier</option>
<option value="Goodman">Goodman</option>
<option value="Lennox">Lennox</option>
<option value="Other">Other</option>
<option value="Rheem">Rheem</option>
<option value="Ruud">Ruud</option>
<option value="Trane">Trane</option>
<option value="York">York</option></select>
</td>
<td>
<input type="text" name="replacementItem[3].model" value="">
</td>
<td>
<input type="text" name="replacementItem[3].seer" value="">
</td></tr>


Could someone figure out why the full path cannot be generated?

Thanks.

Dan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: indexed property problem