Multiple (dynamic) file uploads
Multiple (dynamic) file uploads
- Subject: Multiple (dynamic) file uploads
- From: Julian Wood <email@hidden>
- Date: Mon, 25 Apr 2005 17:06:32 -0600
Hi,
I am new to webobjects, but not to java.
I have a situation where I want to have a form with several fields and
an indeterminate number of fileuploads. The form starts with one
fileupload, but the user can add as many as they want. This is done
with a WORepetition. The problem I'm having is in how to receive these
uploads.
I have no problem with one upload, or 5 uploads, as long as the number
is known. It is just an easy 1:1 binding. But how do I deal with the
above indeterminate situation?
I have been playing around with the form values available from the
context().request() object, but the streams in there (which are easily
locatable) are always empty (which was not entirely unexpected, given
the info in the examples). I have been using the component outputstream
fileupload example as a basis for this work.
I've also played with the WOMultipartIterator, using a DirectAction.
This I can get to work with my indeterminate number of uploads, but how
do you get the form values? The values come across fine, but the name
identifying each form value is changed to something like "3.1, "3.3",
etc. Specifying a name in WOBuilder does not change the name that
actually comes in the request. How do I find out which one is my
"title", for instance? I see that the java file which contains the
bindings for these values is never actually set with the new values (as
in WOComponent-based requests), but even if it was, how would I grab
it's instance?
Is there a way to do this without using DirectAction? Is there a way to
mix a WOComponent-based approach with a DirectAction approach?
Any hints?
Thanks,
J
--
Julian Wood <email@hidden>
Programmer/Analyst
University of Calgary
http://commons.ucalgary.ca
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden