struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject newbie question on indexed properties
Date Fri, 09 Jul 2004 04:39:55 GMT

I have a form bean with a string array defined as a property, with a
corresponding set/get like this:

private String[] answers = { "Answer 1","Answer 2","Answer 3","Answer
4","Answer 5" };
public String[] getAnswers() { return (this.answers);  }
public void setAnswers(String[] value) { this.answers = value; }

On my jsp I've coded the following iteration to display array 'answers' and
it works fine:

<c:forEach var="row" items="${questionForm.answers}">
     <c:out value='${row}'/></br>

But rather than just display these rows, I'd like to write them as
textareas that can be read back into the form-bean.
I've read quite a few postings regarding this, but nothing I've seen and
tried seems to work.

Has anyone actually done this with any success?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message