Im studying Struts yet, but I do this as follow:
<input type="checkbox" name="file" value="file1.ext">
<input type="checkbox" name="file" value="file2.ext">
<input type="checkbox" name="file" value="file3.ext">
To process all files marked (the files not marked doesnt appear:
String[] files = request.getParameterValues("file");
if (files != null) {
for (int x = 0; x < files.length; x++) {
***** process files[x];
}
}
Is there another way more easily?
Is possible do the same thing with tag <html:checkbox> ?
Vinicios Torres
ICHTUS Webmaster
[EMAIL PROTECTED]
http://www.ICHTUS.com.br
----- Original Message -----
From: "Paul Jackson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 9:00 PM
Subject: Checkboxs in a list
> Does anyone of the best approach for the following situation?
>
> I wish to have a list of files for processing with a checkbox on the left
> hand side of each file to indicate if the file should be processed or not.
> I'm looking at how to do this in a single form with a <logic:iterator> tag
> to list the files.
>
> If I use the <html:checkbox> tag the problem is that the names on the
> checkboxes are all the same and I can't distinguish between them.
>
> Any ideas?
>
>
>
> Paul Jackson
> Meridian Informatics
> Sydney, Australia
>
> Ph 8233 7564
> Fax 8233 7533
>
>