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 PROTECTED]<mailto:[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