jQuery in Action, 3rd edition
The moose likes Struts and the fly likes jstl mapped properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "jstl mapped properties" Watch "jstl mapped properties" New topic

jstl mapped properties

Lee Wright

Joined: Nov 29, 2004
Posts: 11
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}">
<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>
<c:forEach items="${lineCode.value}" var="product">
<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>

Can anybody help???

Thanks in advance
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

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 ]

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: jstl mapped properties
It's not a secret anymore!