I am trying to iterate through an array of characters in a JSP, binding a
text field to each character.

The form bean (call it "form") has a method char[] getCharacters() and
corresponding setter.

The JSP looks like this:

    <c:forEach items="${form.characters}" var="char">
           <tr>
            <td>Position
                <c:out value="${char}"/> <%-- Display the value. This
displays correctly --%>
            </td>
            <td>
<%-- now bind the property - this displays an exception No getter method for
property char of bean org.apache.struts.taglib.html.BEAN' --%>
                <html:text property="char"/>
            </td>
        </tr>
    </c:forEach>


I have tried using various combinations of nested and logic iterate, and
tried binding the property with and without ${} but no luck. At worst
nothing compiles, and at best, the page is requiring the collection to
return beans, and doesn't seem to want to work with a character array.
Getting and setting form beans is really not the way I wanted to go, because
it's too much load to transform a char string to a list of Strings, and then
accepting a list of strings back and converting them back to characters, for
each access, not to mention creating and GC'ing all of those extra objects.

Do you have any advice?

Thanks,
Victor Grazi




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to