• 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
Re: Saving data from WOFileUpload in a sub-component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving data from WOFileUpload in a sub-component


  • Subject: Re: Saving data from WOFileUpload in a sub-component
  • From: "Daniele Corti" <email@hidden>
  • Date: Thu, 9 Aug 2007 09:26:42 +0200



2007/8/9, David Holt <email@hidden>:
I have a sub-component inside a form that contains a WOFileUpload.

<form>
Name
Address
<uploadcomponent>
WOFileUpload
Date of upload
</uploadcomponent>
Submit
</form>

Normally I set the values in the database using a method that
evaluates the bindings in the WOFileUpload when I submit the form. In
this case I can't do that because the submit button is in the parent
component. How can I programatically set attribute values in a sub-
form when the parent form is submitted?

David, I really don't see a good reason to split you data in two component: if you have one submit, the best choice would be to have the entire form inside the subcomponent.
Another way would be to set the form as Multiple submit, and create two submit: one for the FileUpload, One for the other data to save.

I.E.

YourMainComponent Start
  <wo:WOForm>
  <wo:WOTextFileds value="$name" />
  <wo:WOText value="$address" />
  <wo:UpLoadComponent />
  <wo:WOSubmitButton action="" />
  </wo:WOForm>
YourMainComponent End

UpLoadComponent Start
  <wo:WOFileUpload /> //I don't remember the binding for this...
  <wo:WOSubmitButton action="" />
UpLoadComponent End

You can see I don't insert Date of Upload, because I've not understand what that was: if it is an input for the date is useless, because The date is the moment when the submit is press, if it is a String with the current date, you can display it after the submit of the subcomponent, in place of the WOFIleUpload
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AIM: S0CR4TE5
Messenger: email@hidden

--
Computers are like air conditioners -- they stop working properly if you open
WINDOWS

--
What about the four lusers of the apocalypse? I nominate:
"advertising", "can't log in", "power switch" and "what backup?"
--Alistair Young
 _______________________________________________
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: Saving data from WOFileUpload in a sub-component
      • From: David Holt <email@hidden>
References: 
 >Saving data from WOFileUpload in a sub-component (From: David Holt <email@hidden>)

  • Prev by Date: Re: Webobjects Applications
  • Next by Date: Re: Webobjects Applications
  • Previous by thread: Saving data from WOFileUpload in a sub-component
  • Next by thread: Re: Saving data from WOFileUpload in a sub-component
  • Index(es):
    • Date
    • Thread