RE: The order in which formelements are processed
RE: The order in which formelements are processed
- Subject: RE: The order in which formelements are processed
- From: "Fournier, Pete" <email@hidden>
- Date: Mon, 21 Apr 2003 15:25:32 -0400
- Priority: normal
- Thread-topic: The order in which formelements are processed
You should look at WOComponent.synchronizesVariablesWithBindings(), you
can see it in the docs at
http://developer.apple.com/techpubs/webobjects/Reference/API/index.html
Then use valueForBinding(...) and setValueForBinding(...) to manipulate
the bound items manually to and from your component.
Pete Fournier
-----Original Message-----
From: Jonathan Rochkind [mailto:email@hidden]
Sent: Monday, April 21, 2003 12:45 PM
To: Kaj Hejer; email@hidden
Subject: Re: The order in which formelements are processed
I don't know if there's any way you can do this except making sure the
popup button is in the form BEFORE the WOFileUpload. I'm pretty sure
that
earlier inputs get their values first.
This is annoying though. What if you wanted the popup to be lower on the
page, but still processed first? There ought to be some way to do this.
But
I'm not sure what it is. You could try looking at the
request.formValues() stuff yourself manually, but I'm not sure how to do
this in a useful way. It might be easier in a session-less DirectAction
situation. And with streaming uploads, you need to be careful with the
formValues method, if you don't deal with it right you can find the
entire
upload in memory even though you meant to stream it. I don't entirely
understand, the whole thing is kind of confusing to me. But doing
something
tricky with request.formValues manually is the only way I can think of
to
alter the order that the elements get their values from the request.
--Jonathan
At 04:46 PM 4/20/2003 +0200, Kaj Hejer wrote:
>Hi!
>
>In a form I have two attributes, a WOFileupload and a WOPopUpButton.
>
>In the WOPopUpButton you can select some metadata about the file you
>uppload.
>
>I have bound the data binding for the WOFileupload to
>selectedFile.fileData.
>
>In the setFileData method I can do a few different things, depending on
>what the user select in the WOPopUpButton.
>
> From what I can see I need the WOPopUpButton to be processed first and
> then the WOFileupload. I have never played with the order which
> formelemens are processed, but takeValueFromReqest seems like the
right
> place to do this.
>
>Has any of you any ideas on how I can controll the order my formelemens
>are processed?
>
>TIA!
>
>
>-Kaj :)
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives:
>http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
----------------
This communication (including all attachments) is intended solely for the use of the person(s) to whom it is addressed and should be treated as a confidential AAA communication. If you are not the intended recipient, any use, distribution, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately delete it from your system and notify the originator. Your cooperation is appreciated.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.