Re: EODisplayGroup
Re: EODisplayGroup
- Subject: Re: EODisplayGroup
- From: Nathan Dumar <email@hidden>
- Date: Thu, 17 Jun 2004 18:26:17 -0400
The doc page for the EODisplayGroup will help ...
http://developer.apple.com/documentation/WebObjects/Reference/API/com/
webobjects/eointerface/EODisplayGroup.html
Starting with the method selectObject(), you'll find a short list of
methods to select a single or a group of objects. The summary is, you
pass an object to the EODG using one of the methods and it will look
for a match; if it finds a match, it will select it. You can then
access that object using the selectedObject() method.
// set selection
anEOdg.selectObject(personObj);
// or, for what you describe ... selectionNumber is an Integer with
// a value of 9(I *think* the numbering starts at zero ...)
anEOdg.setSelectionIndexes(new NSArray(selectionNumber));
// use selection
anEOdg.selectedObject().name();
WODisplayGroups are similar, and have different functionality that may
be useful to you, not to mention they're very easy to set up (but have
other limits that make them impractical in some situations). The
EODisplayGroup and the WODisplayGroup have many similar methods.
http://developer.apple.com/documentation/WebObjects/Reference/API/com/
webobjects/appserver/WODisplayGroup.html
Nathan
On Jun 17, 2004, at 3:22 PM, Yves Custeau wrote:
Hello,
I need to programmatically select a specific entry of an
EODisplayGroup. I'm
having difficulty doing so.
I can traverse the result set with a FOR loop and get the associated
value
using:
eodisplaygroup.valueForObjectAtIndex(i,"valuetoretrieve").toString()
Let say I want to make the 10th entry the SELECTED object what
function do
you use for that?
I guess that there is a better way than looping 10 times over the
selectNext() function
Thanks !!
_______________________________________________
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.