Re: Adding Objects to an ArrayList (Checkboxes)
Re: Adding Objects to an ArrayList (Checkboxes)
- Subject: Re: Adding Objects to an ArrayList (Checkboxes)
- From: LD <email@hidden>
- Date: Tue, 11 Oct 2005 16:13:20 +1000
Hi again,
On 11/10/2005, at 2:44 PM, LD wrote:
For the gem, to get the current list of selected servers (about 2-3
lines of readable code) see updateServerSelectionsAndProcessEmail()
action below. It's simple; easy.
Woops...
<...>
public WOComponent updateServerSelectionsAndProcessEmail() {
EmailServerContacts nextPage;
NSArray allServers;
NSDictionary allServerSelections;
updateServerSelections();
nextPage = ( EmailServerContacts )pageWithName
( "EmailServerContacts" );
nextPage.setEc( ec() );
//
// ==== the ease of KeyValueCoding ====
// ==== assume that aServer.isSelected() returns a Boolean
object ====
//
allServers = allServers();
allServerSelections = new NSDictionary
( allServers.valueForKey( "isSelected" ), allServers );
nextPage.setServers( allServerSelections.allKeysForObject
( Boolean.TRUE ) );
return nextPage;
}
}
<...>
with regards,
--
LD
_______________________________________________
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