Eric Hamacher wrote:
Hello:

I have a form on which there can, in theory, be an infinite number of
checkboxes (Users are selecting files from a tree and there is no
telling how many will be selected).  The name of each checkbox is
determined at runtime (= to the path of the file).  That being the case,
how can I set up an action to read these parameters?  Or do it need to
go back to the servlet API?

If you're using Struts 2, don't name your checkboxes like that.
Create an array or list property in your action and include the index in each checkbox name:

List<String> filenames = new LinkedList<String>();

<input type="checkbox" name="filenames[0]" value="filenameA">
<input type="checkbox" name="filenames[1]" value="filenameB">
<input type="checkbox" name="filenames[2]" value="filenameC">


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to