• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Multiple (dynamic) file uploads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Multiple (dynamic) file uploads
      • From: Hugi Thordarson <email@hidden>
    • Re: Multiple (dynamic) file uploads
      • From: Julian Wood <email@hidden>
  • Prev by Date: Mandatory To-One Preventing Deletion
  • Next by Date: Re: Multiple (dynamic) file uploads
  • Previous by thread: Re: Mandatory To-One Preventing Deletion
  • Next by thread: Re: Multiple (dynamic) file uploads
  • Index(es):
    • Date
    • Thread