• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jstl mapped properties

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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}"><c:out value="${lineCode.key.productCode}"></c:out></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}"><c:out value="${lineCode.key.productCode}"/></html-el:link></th>
<th nowrap="nowrap" class="grey" scope="row"><html-el:link action="/viewLinecode?selectedProduct=${product.ID}"><c:out value="${product.productCode}"/></html-el:link></th>
<td nowrap="nowrap" class="grey" scope="row"><c:out value="${product.description}"/></td>
<td nowrap="nowrap" class="grey" scope="row"><c:out value="${product.size}"/></td>
</tr>
</c:forEach>
</c:forEach>

Can anybody help???

Thanks in advance
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic