Z,

Have a look at the following page:

http://struts.apache.org/2.x/docs/html-form-buttons-howto.html

I haven't worked through your use-case yet, but it may get you where you want 
to be.  I've used these techniques in my apps.

Best,

jb


On Nov 1, 2012, at 9:47 AM, Zoran Avtarovski <zo...@sparecreative.com> wrote:

> I have a two dimension array in my action:
> 
> Integer[][] dataArray with appropriate getter/setter.
> 
> In my form I use the following checkbox tag to pass the data from user to
> action
> 
>                        <s:iterator var="attributeType" value="someList"
> status="typeStat">
>                            <s:iterator value="aDpendentList"
> var="attribute" status="attStat">
>                                <s:checkbox
> name="dataArray[%{#typeStat.index}][%{#attStat.index}]"
> label="%{#attribute.name}" fieldValue="%{#attribute.attributeId}"/>
>                            </s:iterator>
>                        </s:iterator>
> 
> The form renders correctly in that the checkboxes are named dataArray[0][1]
> and so forth, but I can't the array form data into the array.
> 
> Is there something I'm missing? I thought this was possible.
> 
> I'd appreciate any help as the only other option I can see is to construct a
> string with a the multi dimension data and then token and construct the
> array in the action, which I'd rather not.
> 
> Z.
> 
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to