>> <c:out value="${char}"/> <%-- Display the value. This displays correctly --%>
>> <html:text property="char"/>

May sound like an obvious question but do you have the methods getChar
and setChar within your form bean?..  Also as it's nested within a
loop it may result in many instances of the input box with the same
name, so I'd imagine you'd need something like:

private String[] char;
public getChar() { return char;}
public setChar(String[] char) { this.char = char;}

Tim Christopher

On Mon, 21 Mar 2005 23:18:43 -0500, Victor Grazi <[EMAIL PROTECTED]> wrote:
> 
> 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]
> 
>

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

Reply via email to