You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ravi Kora <rk...@1bigthink.com> on 2002/07/16 15:34:05 UTC
Iterating multiple collections using logic:iterate- Is it possible with Struts?
Did anyone come across the problem of iterating over multiple collection
objects in logic:iterate? The tag works fine if we have a single
collection. But I am not getting it to work with multiple collections. I
want to know if anyone has done the above using the logic:iterate tags?
-Ravi
Thanks & Regards,
Ravi Kora
kora@louisiana.edu
337-739-3434(M)
-----Original Message-----
From: James Mitchell [mailto:jmitchtx@telocity.com]
Sent: Monday, July 15, 2002 3:14 PM
To: Struts Users Mailing List
Subject: RE: Html:checkbox issue
Try this...
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<form name=myForm method=post action="/myapp/doAction.do"> <INPUT
type="checkbox" name=checkbox1>check 1<br> <INPUT type="checkbox"
name=checkbox2>check 2<br> <INPUT type="checkbox" name=checkbox3>check
3<br> <INPUT type="checkbox" name=checkbox4>check 4<br> <INPUT
type="checkbox" name=checkbox5>check 5<br> <INPUT type="checkbox"
name=checkbox6>check 6<br>
</form>
<SCRIPT LANGUAGE=javascript>
<!--
function SetChecked(val) {
dml=document.forms["myForm"];
len = dml.elements.length;
var i=0;
for( i = 0 ; i < len ; i++) {
if (dml.elements[i].type=='checkbox') {
if ( val == 'off' ){
dml.elements[i].checked=false;
}else if ( val == 'invert' ) {
dml.elements[i].checked =
(!dml.elements[i].checked);
}else{
dml.elements[i].checked=true;
}
}
}
}
//-->
</SCRIPT>
<P> </P>
<a href="javascript:SetChecked('on')">Check All</a>/
<a href="javascript:SetChecked('off')">Clear All</a>/
<a href="javascript:SetChecked('invert')">Invert</a>
</BODY>
</HTML>
James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta
> -----Original Message-----
> From: Kamholz, Keith (corp-staff) USX [mailto:kkamholz@moog.com]
> Sent: Monday, July 15, 2002 9:44 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Html:checkbox issue
>
>
> This is just a shot in the dark, but could you specify the onclick
> attribute of the checkbox to run some javascript? When clicked, you
> could swap the checkbox properties back and forth between checked and
> not checked. Does anyone else think something like this would work
> well? It's just an idea...
>
> ~ Keith
> http://www.buffalo.edu/~kkamholz
>
>
>
> -----Original Message-----
> From: Toni Nehme [mailto:tnehme81@hotmail.com]
> Sent: Monday, July 15, 2002 9:36 AM
> To: struts-user@jakarta.apache.org
> Subject: Html:checkbox issue
>
>
>
> Hi All,
>
>
> I have checkbox displayed in a table and I am trying to create a a
> checkbox outside the table to check All the checkboxes inside the
> table.
>
> My table is using the logic:iterate tag and displays the table.
>
> Please, let me know if anybody knows how to solve this.
>
>
> Thanks.
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>