• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOPopUpButton - list & selection not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOPopUpButton - list & selection not working


  • Subject: Re: WOPopUpButton - list & selection not working
  • From: Jonathan Rochkind <email@hidden>
  • Date: Thu, 20 Feb 2003 10:49:51 -0600

If 'list' is bound to an NSArray of objects with class Category, then 'selection' should be bound to a variable of class Category as well.

After the form is submitted, the selection-bound variable will contain the Category object that the user selected in the popup.

Under normal conditions, you probably shouldn't use the selectedValue binding at all. But you will probably be interested in the displayString binding, to have a reasonable string in the popup menu, instead of simply the toString() representation of each Category.

Hope this helps,
--jonathan

At 11:31 PM 2/19/2003 -0500, Thomas Peters wrote:
WOPopUpButton

list
Array of objects from which the WOPopUpButton derives its values.

selection
Object that the user chose from the selection list. For the college example,
selection would be a college object.

selectedValue
Value that is used with direct actions to specify which option in the listis
selected.

The only documentation I can find is in the PDF under the DynamicELements
directory. I have also review the example in 'PetStoreWOJava' where the
'UpdateAccount.wo' contains 2 WOPopUpButton for states and countries.

I have products and categories, where categories is a parent object to
products. Category is defiled as a category_id and a category_name. The stored
value is category_id and the displayed value is category_name.

I can't seem to get the bindings right for this, or I just do not understand
how it works. I have set the list binding to an NSArray containing the
categories. I have set the selection to the product.category_id. This follows
the pattern exemplified in the example, but throws an exception because
'selection' binding returns the DisplayedValue of the WOPopUpButton. What am I
doing wrong?

Tom
_______________________________________________
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.

References: 
 >WOPopUpButton - list & selection not working (From: "Thomas Peters" <email@hidden>)

  • Prev by Date: Re: Working with more than one Application
  • Next by Date: ADC-TV
  • Previous by thread: Re: WOPopUpButton - list & selection not working
  • Next by thread: Calling a Oracle Stored Procedure/Function
  • Index(es):
    • Date
    • Thread