You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paolo Niccolò Giubelli <pa...@itestense.it> on 2008/07/01 18:26:34 UTC
Re: Retrieve an hashtable entry within a jsp using struts tag and
a bean as the key
Maybe using Apache Commons BeanUtils? Anybody knows?
Thanks again.
Paolo
Paolo Niccolò Giubelli ha scritto:
> I'm sorry, but I'm still unable to do that.
> Ciro Montanino ha scritto:
>> Try to use jstl tag library to read HashTable contents.
>>
>> On Mon, Jun 30, 2008 at 4:29 PM, Paolo Niccolò Giubelli <
>> paoloniccolo.giubelli@itestense.it> wrote:
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Retrieve an hashtable entry within a jsp using struts tag and
a bean as the key
Posted by Paolo Niccolò Giubelli <pa...@itestense.it>.
Ok, I used jstl and now it works!
Here's the code (it's changed since the first post, so don't compare it):
<logic:iterate id="category" name="pannelloForm"
property="highLevelCategories">
<div>
<h5><bean:write name="category" property="name"/> </h5>
<c:set var="subcategories"
value="${pannelloForm.highLevelCategoriesChildren[category.id]}"></c:set>
<ul>
<c:forEach var="subcategory" items="${subcategories}">
<li>${subcategory.contenuto.name}</li>
</c:forEach>
</ul>
</div>
</logic:iterate>
where:
- pannelloForm is the ActionForm bean
- highLevelCategories is an ArrayList<FProductCategory>
- highLevelCategoriesChildren is an
Hashtable<Integer,ArrayList<FProductCategory>>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org