Re: WOPopup Button
Re: WOPopup Button
- Subject: Re: WOPopup Button
- From: "Daniele Corti" <email@hidden>
- Date: Thu, 20 Mar 2008 10:33:34 +0100
2008/3/20, Alexander Spohr <email@hidden>:
Am 19.03.2008 um 22:18 schrieb Yury Peskin:
> Hello List,
> I need to have the WOPopUp Button set to a specific value.
> I have a project EO that has a to-one relationship to project status
> EO and I need a WOPopUp button to display a specific project status.
> Here's what my WOPopUp Button is wired like:
> list = projectStatusList (a list of all project statuses)
OK.
> item = project.projectStatus (the specific value a WOPopUp Button
> should have)
Wrong. You want the selection to be the specific value.
> displayString = projectStatus.message (a display message)
OK
Not exactly...see at bottom
> selection = selectedProjectStatus (the selection)
Wrong again :) Switch with item.
> But it's not working.
It can't.
> Is there a way of doing it?
Yes.
atze
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
WOPopUpButton work like this:
you prepare a list of the options you'll going to see in the result HTML in a NSArray, or subclass, and bind it to the
list binding.
While generating the page, WOPopUpButton Iterate over the list and save each Object in a temporary variable or in the variable you bind to the
item binding
The
displayString binding say what to display in the option tag at each loop over the list (ie. <option><!--displayString value --></option>), so if you use the object in the item binding you can change the value displayed with a releated value at the objects in the list.
the
selection binding is the variable where, at the submit of the form, the object corresponding at the value you choose in the select is saved.
For this, you need to have the same type in item and selection binding, that must be the same type of the objects in the NSarray.
Hope this help.
--
Daniele Corti
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