You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Konjengbam Singh <Ko...@symphonysv.com> on 2006/03/10 14:00:21 UTC

sending 2D string for setting the ActionForm using addRequestParameter

how to send a String[][] using addRequestParameter?
I m extending CactusStrutsTestCase class.
I have a ActionForm which have a String[][] as one of the variable. I need to setup this variable for running the test case. How should i go about doing this?

Re: sending 2D string for setting the ActionForm using addRequestParameter

Posted by Rahul Akolkar <ra...@gmail.com>.
On 3/10/06, Konjengbam Singh <Ko...@symphonysv.com> wrote:
> how to send a String[][] using addRequestParameter?
> I m extending CactusStrutsTestCase class.
> I have a ActionForm which have a String[][] as one of the variable. I need to setup this variable for running the test case. How should i go about doing this?
>
<snip/>

You may end up with m*n addRequestParameter calls for a m by n
String[][]. For understanding what the parameter names should be, take
a look at how Struts handles population of indexed properties [1].
Under the hood, its mostly Commons BeanUtils [2] which transitively
works off of the JavaBeans specification [3] to provide bean
utilities, so feel free to browse those as well.

-Rahul

[1] http://struts.apache.org/struts-taglib/indexedprops.html
[2] http://jakarta.apache.org/commons/beanutils/
[3] http://java.sun.com/products/javabeans/docs/spec.html