2007/8/9, David Holt <[EMAIL PROTECTED]>:
>
> 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="$saveAllData" />
  </wo:WOForm>
YourMainComponent End

UpLoadComponent Start
  <wo:WOFileUpload /> //I don't remember the binding for this...
  <wo:WOSubmitButton action="$uploadFile" />
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.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com
>
> This email sent to [EMAIL PROTECTED]
>



-- 
Daniele Corti
AIM: S0CR4TE5
Messenger: [EMAIL PROTECTED]

--
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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to