Title: Re: Help: How to use WOPopupButton
Hi Jim

If you mean to get the id of selected country (object), you can do that by having defined a get method in your EO Class for that entity country. This still maintains the sanctity of the primary key properties by not allowing you to set it because you never open a set method for it.

Thanks,
Ashish

On 2/5/06 6:50 AM, "Jim Wong" <[EMAIL PROTECTED]> wrote:

If I do what's described below and have my selection of the WOPopupButton to be an object (Country), I want to pass this object's countryID attribute to a string tempCountry in my code. How can I do so?

 
Warmest Regards,
Jim Wong
[EMAIL PROTECTED]


 

On 17 Jan 2006, at 10:19 AM, Art Isbell wrote:

On Jan 16, 2006, at 3:51 PM, [EMAIL PROTECTED] wrote:

 
I have a table "Country" which contains names of all the countries in the world.
I want it to be displayed in a WOPopupButton in a form for selection. But can't
seem to get the data to be displayed in the list of the popup button. What are
the bindings, keys or actions i have to configure?
 

If you want the selection to be a country name (String):

WOPopUpButton Key   Bound To
list                countryNames NSArray
item                countryNameItem String
selection           selectedCountryName String
escapeHTML          false

But if you want the selection to be a country object (Country):

WOPopUpButton Key   Bound To
list                countries NSArray
item                countryItem Country
displayString       countryItem.name
selection           selectedCountry Country
escapeHTML          false

I'm sure users other than me hate popup buttons that contain so many items that they extend off the edge of the screen.  Instead, please consider using a WOBrowser if you have sufficient room on your component.  The only binding difference:

WOBrowser Key  Bound To
selections     selectedCountryNames or selectedCountries NSArray containing a single item

Aloha,
Art

_______________________________________________
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/jimwong%40thegnow.com

This email sent to [EMAIL PROTECTED]


 



_______________________________________________
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/ash.ashish.ash%40gmail.com

This email sent to [EMAIL PROTECTED]


--

 _______________________________________________
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