• 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
WOPopup doesn't display the selection attribute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WOPopup doesn't display the selection attribute


  • Subject: WOPopup doesn't display the selection attribute
  • From: "Bjerke, Michael A." <email@hidden>
  • Date: Wed, 06 Feb 2008 17:26:34 -0500
  • Acceptlanguage: en-US
  • Thread-topic: WOPopup doesn't display the selection attribute

I have an application with a page that contains some text boxes (WOTextField) and some popups (WOPopup).  Normally this page is brought up with nothing filled in by creating a new (empty) object of the class Entry, but I can also bring it up by setting the Entry object to one from my database.  The WOTextFields display correctly because they are bound to particular fields in the Entry object, e.g. entry.title.  The popups, however, never display the entryType value in the Entry object.  Here are the bindings for one of the popups.

 

displayString                      entryTypeItem.name

item                                       entryTypeItem                 This is an EntryType object

list                                          availableEntryTypes        This is a list of EntryType objects

noSelectionString            “None”

selection                              entry.entryType               entry is an Entry object; entry.entryType is an EntryType object

 

Now, I understand that when the user chooses a value in the popup, that value gets stored in the entryType field of the Entry object, because of the selection binding.  But what I have is the entryType already set.  I expected the popup to show that entry, but it always shows the top entry in the list, None, as selected.  I tried using the selectedValue attribute instead, but that made no difference.  I turned WODebug on for this popup and the log entries show that the selection attribute has the correct EntryType.

 

The EntryType class has a name field, and that’s what is displayed in the popup.  But how is the system supposed to know how to compare the selection attribute’s value with each of the EntryTypes in the list?  Does it just do something like entry.entryType.equals(entryTypeItem)?  If I replace all references to EntryType with just Strings, this works OK, but I’s rather have the EbtryTypes in there.

 

Can you tell me how I am supposed to pre-populate the popups?

 

Thanks.

 

 

Michael Bjerke

Oak Ridge National Laboratory

Information Technology Services Division

Office:(865) 574-4654

Cell:   (865) 567-8385

email@hidden

 

 _______________________________________________
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

  • Follow-Ups:
    • Re: WOPopup doesn't display the selection attribute
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Educate me on generics please...
  • Next by Date: Re: WOPopup doesn't display the selection attribute
  • Previous by thread: Re: base URL set in html head
  • Next by thread: Re: WOPopup doesn't display the selection attribute
  • Index(es):
    • Date
    • Thread