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



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:out value="${group}"/>" value="No Privilege">No
Privilege
<option key="<c:out value="${group}"/>" value="Read Only" <c:if
test="${UserAccessBean.updateCurrentPortfolioAccess2[groupLoop.count-1]
eq 'Read Only'}"> <c:out 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

.



Relevant Pages

  • Re: Can Not find bean in scope error when trying to display in jsp
    ... I'm new with Struts and Hibernate. ... BookListForm bookListForm = form; ... String author = null; ...
    (comp.lang.java.programmer)
  • Struts Help
    ... table using struts in netbeans 5.0. ... private DataSource dataSource; ... String jobtitle; ... public job(String jobid,String jobtitle,String applydate) { ...
    (comp.lang.java.programmer)
  • Re: nested beans in struts?
    ... What you describe is not a nested bean, ... If the string variable name is "code", ... >private String firstname; ... >public void setUsername(String username) ...
    (comp.lang.java.programmer)
  • Re: Problem about Struts Tags
    ... > In Struts bean tab library, for the define tag, what is use of name ... Can't think of a good web resource to be honest - since to be honest ... I'm happy with the apache documentation - but you ought to join the ...
    (comp.lang.java.programmer)
  • Struts ActionForm set methods not being executed
    ... I have a regular html form, no struts tags, triggering a struts action on ... Within the form there are two text boxes and one listbox. ... contains a string of the type 1,2 One textbox value contains a string with ... On submission the set method in the ActionForm for the all alpha string ...
    (comp.lang.java.programmer)