• 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: More than one WOPopupButton in the same form - SOLVED
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More than one WOPopupButton in the same form - SOLVED


  • Subject: Re: More than one WOPopupButton in the same form - SOLVED
  • From: Dumitru Husleag <email@hidden>
  • Date: Wed, 9 Mar 2005 11:23:55 +0100

   Analysing the request in debug mode i saw that the value sent for
the popup is the index of the selected item or none if there is no
selection.
   Il give you my solution. Maybe you'll give me a better (proper) one :)

<code>
        String popupName = popupBtnNameForItem(item);
        WORequest req = context().request();
        Object objValue = req.formValueForKey(popupName);
        if(objValue != null){
            String strValue = objValue.toString();
            int selectedIndex = Integer.parseInt(strValue.toString());
            MyItemClass selectedItem =
                (MyItemClass)getListMyItems().objectAtIndex(selectedIndex);

             // do the job here
        }
</code>

where popupBtnNameForItem makes a unique name from the Item object.


On Fri, 4 Mar 2005 15:21:37 +0100, Dumitru Husleag
<email@hidden> wrote:
>    Hello everybody,
>
>    I have a form, inside there is a table and each table row has a
> submit button and a WOPopupButton.
>    When I click the Submit button on a row i need to get the selected
> item in the list but instead i get the selected item in the last row.
>    So how should I deal with this ?
>
 _______________________________________________
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: 
 >More than one WOPopupButton in the same form (From: Dumitru Husleag <email@hidden>)

  • Prev by Date: Re: WebObjects Versions Supported on 2003 Server with IIS 6
  • Next by Date: cannot catch NSValidation.ValidationException
  • Previous by thread: Re: More than one WOPopupButton in the same form
  • Next by thread: Problem running Web Services WO server _within_ WOLips
  • Index(es):
    • Date
    • Thread