WOPopupButton Novice help
WOPopupButton Novice help
- Subject: WOPopupButton Novice help
- From: "Greg Liebowitz" <email@hidden>
- Date: Sun, 22 Feb 2004 23:37:16 -0500
Hello!
I am new to WebObjects and apologize for my ignorance ;)
I am trying to take the column Name from a database table Location and
display it in a popup button. I have the following code in the Session
class:
// Fetch Location table
EOFetchSpecification fetchSpecA;
EOEditingContext ecA = defaultEditingContext();
fetchSpecA = new EOFetchSpecification("Location", null, null);
NSArray locationTemp = ecA.objectsWithFetchSpecification(fetchSpecA);
competitionNameArr = new NSMutableArray(locationTemp);
Then I have the following attributes on the popup button in SetLocation.wo:
The popup button displays perfectly. It's just getting the selection which
is the problem.
displayString competitionLocation.locationName
item competitionLocation
list session.competitionNameArr
selection locationSelection
In SetLocation.java I added:
protected Location competitionLocation
Now, when I return locationSelection, I get the following output:
{values = {matchloc = " )>"; competitionType = "Regional"; name = "New
Jersey"; comments = ; }; this = " "; }
My question is: How can I get just the name key, and have it in the form of
a string?
Thank you in advance,
Greg Liebowitz
_______________________________________________
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.