Thanks for both of the replies.  I got caught up working on some other stuff
and was just barely able to come back to this issue.  The original error I
was receiving was the following:

...
2009-10-20 14:55:33,745 ERROR
com.opensymphony.xwork2.util.InstantiatingNullHandler - Could not create
and/or set value back on to object
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '[[Ljava.lang.String;': Could not resolve matching constructor
...

It took me about 5 seconds to figure out what I was doing wrong :)  I was
not initializing the two-dimensional array so when it went to set the values
on the array it was blowing up with the above error.  So, just to test this
out, I created the class variable as follows:

...
private String[][] dataCollection = new String[100][100];
...

Hopefully it won't be a stretch for me to figure out how to initialize this
dynamically so that I get the proper-sized array!

Thanks again for help from both you.

Daniel Stephenson
dan.stephen...@gmail.com
208.284.9637 - Cell
208.375.3888 - Office
208.498.2033 - Fax

On Tue, Oct 20, 2009 at 12:42 PM, Musachy Barroso <musa...@gmail.com> wrote:

> what kind of problem are you having? Is it not calling
> "setDataCollection" at all? or are you not getting the expected values
> in the array?
>
> musachy
>
> On Tue, Oct 20, 2009 at 10:04 AM, Daniel Stephenson
> <dan.stephen...@gmail.com> wrote:
> > 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
> >
>
>
>
> --
> Screw John Galt, who is Martin Gainty?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to