Hello everyone,

I had a question regarding multi-dimensional arrays and how they are handled
by OGNL (struts2).

I have the following snippet in my JSP:

...
<input type="text" name="dataCollection[0][0]" id="data00" class="..."
maxLength="1" size="1"/>
<input type="text" name="dataCollection[0][1]" id="data01" class="..."
maxLength="1" size="1"/>
...

On the Action side I have a class variable declared at the top with a
corresponding setter:

...
private String[][] dataCollection;
...
public void setDataCollection(String[][] dataCollection)
{
   this.dataCollection = dataCollection;
}
...

I haven't had much difficulty handling the output of a two-dimensional array
such as this, but am unable to figure out the right way of handling this as
input.  I am using struts 2.0.14.

Thanks for your assistance.

Daniel Stephenson
dan.stephen...@gmail.com

Reply via email to