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

Discussion in 'Java' started by SpaceAgeJuliet, May 31, 2006.

  1. 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
    <option key="<c:eek:ut value="${group}"/>" value="Read Only" <c:if
    eq 'Read Only'}"> <c:eek:ut value="selected" /> </c:if> >Read Only

    Any help appreciated!

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

    java.lang.IllegalArgumentException: argument type mismatch
    SpaceAgeJuliet, May 31, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.