• 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: How to use WOPopUpButton?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use WOPopUpButton?


  • Subject: Re: How to use WOPopUpButton?
  • From: LD <email@hidden>
  • Date: Wed, 5 Oct 2005 10:35:27 +1000

Hi Leila,

On 04/10/2005, at 7:33 PM, leila nemmiche wrote:

I've tried to use the WOPopUpButton. I need to know how to select an item of this list in order to call upon an action following this selection (choice). What are the steps to follow in .WO and .java. Thank you.

YourPopUpButton: WOPopUpButton { list = theList; /* [1] */ selection = selectedItem; /* [2] */ noSelectionString = "-- choose one --"; displayString = anItem.name; /* [3] */ item = anItem; /* [4] */ }

[1] path to the list of items to iterate relative to current component. e.g., productsList || application.marketingChoices || ...
[2] this variable will be equal to one of theList items if a selection was made. It should also have the previous selection (if applicable). If set anItem == selectedItem at some point.
[3] if your list has items that aren't strings then use this to determine what method to call on each item to get a string value to display
[4] anItem is each item in the list as it is iterated.


So upon form submission you can determine the selection via selectedItem. If you're wanting the form to be submitted upon user selection then add an additional binding to the popup:

YourPopUpButton: WOPopUpButton {
    <...>
    onChange = "javascript:this.form.submit;" /* or whatever */
}

with regards,
--

LD


_______________________________________________ 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
References: 
 >How to use WOPopUpButton? (From: leila nemmiche <email@hidden>)

  • Prev by Date: Re: Direct to Java Client and frameworks
  • Next by Date: Re: deleteSelection sets relationship null rather than deleting
  • Previous by thread: How to use WOPopUpButton?
  • Next by thread: RE: Start Error
  • Index(es):
    • Date
    • Thread