This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jstl mapped properties

 
Lee Wright
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm hitting the following problem using mapped properties...

I have a map of objects where the key is a Product object and the value is a List of Product objects.
I loop through the objects and want to be able to select one or more items using a checkbox.

The looping works fine but the isSelected property never gets set:

<c:forEach varStatus="i" var="lineCode" items="${requestForm.linecodeItems}">
<tr>
<th> </th>
<th class="grey"><html-el:link action="/viewLinecode?selectedProduct=${lineCode.key.ID}"><cut value="${lineCode.key.productCode}"></cut></html-el:link></th>
<th scope="row"> </th>
<th scope="row"> </th>
<th scope="row"> </th>
</tr>
<c:forEach items="${lineCode.value}" var="product">
<tr>
<th class="grey" scope="row"><html:checkbox name="product" property="selected" value="true" indexed="true"/></th>
<th nowrap="nowrap" class="grey" scope="row"><html-el:link action="/viewLinecode?selectedProduct=${lineCode.key.ID}"><cut value="${lineCode.key.productCode}"/></html-el:link></th>
<th nowrap="nowrap" class="grey" scope="row"><html-el:link action="/viewLinecode?selectedProduct=${product.ID}"><cut value="${product.productCode}"/></html-el:link></th>
<td nowrap="nowrap" class="grey" scope="row"><cut value="${product.description}"/></td>
<td nowrap="nowrap" class="grey" scope="row"><cut value="${product.size}"/></td>
</tr>
</c:forEach>
</c:forEach>

Can anybody help???

Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this has more to do with the Struts tag than JSTL, moving to the Web App Frameworks forum.
[ December 11, 2004: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic