You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by zhoudan <zh...@neusoft.com> on 2004/11/09 15:36:04 UTC

how to get checkbox[x][y] with embededing iterate to iterate.

i have been breaked down with it, my boss is watching me with angry, please 
give me your help. thank you!

quesion:(sorry for my poor english)

there are: action1, form1, form2,action2.
in action1, i connect database and get a 'List'. in which there are 'member's.
and another 'list', in which 'attribute's(less than 64). each member has many 
attibutes in the 2nd list.
i will put this to the form1. and forward it to a jsp file, to a explorer.
so, it looks in explorer like this:
         [attrA][attrB][attrC][...]
[member1][Y    ][     ][Y    ][...]
[member2][     ][Y    ][Y    ][...]
[member3][     ][Y    ][     ][...]
......
it looks like a <html:table> with checkbox[x][y].
i should change some checkbox, then submit it as form2 to action2. 
in action2, i must know following from the form : how many members are submited
(members maybe added by jscript before or after i change chechbox)? what 
attributes each member has?

the trouble is: i can not find a struct to store the data.
is it ok like this?
form{
enum attr // less than 64
List member;
}
member{
String memberName;
String[64] attr;
}

but, i can not write the right jsp file.
<iterate>
   <iterate>
      <html:checkbox ????
   </iterate>
</iterate>

if i use check box, it has only one index. if i use multibox, it can not set 
the value(you do not know any value when you write jsp).if i use html's tag,  i 
can not know which one was checked...

~~~wuwu~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


   if you know how to do this , please e-mail me directly, eagerly waitting...
    my mail:  zhoudan@neusoft.com

   thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org