Struts help--how to use other than String, vector in a bean?

S

SpaceAgeJuliet

I am using Struts, and JSTL at the moment, but am a beginner.
I can get values in and out fine that are strings, string arrays and
vectors in my beans.
normally i just declare string or vector value in bean, with getters
and setters, and struts populate knows how to store correctly when a
form is submitted.

But, I would like to use a TreeMap in a bean, too.

Can anyone tell me how to do this? I made a treemap into my bean, with
getters and setters, and I tried to store it like this in my jsp:

....
<c:when test="${UserAccessBean.portfolioAccess[groupLoop.count-1] eq
'Read Only'}">
<select name="test">
<option key="<c:eek:ut value="${group}"/>" value="No Privilege">No
Privilege
<option key="<c:eek:ut value="${group}"/>" value="Read Only" <c:if
test="${UserAccessBean.updateCurrentPortfolioAccess2[groupLoop.count-1]
eq 'Read Only'}"> <c:eek:ut value="selected" /> </c:if> >Read Only
</select>
</c:when>
....


Any help appreciated!

The form displays right but when i make selection and click submit, I
got:

java.lang.IllegalArgumentException: argument type mismatch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top