2008/3/20, Alexander Spohr <[EMAIL PROTECTED]>:
>
>
> 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      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com
>
> This email sent to [EMAIL PROTECTED]
>


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 itembinding
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 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      (Webobjects-dev@lists.apple.com)
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