Re: WODisplayGroup Multiple deletion
Re: WODisplayGroup Multiple deletion
- Subject: Re: WODisplayGroup Multiple deletion
- From: David LeBer <email@hidden>
- Date: Thu, 8 Dec 2005 07:45:12 -0500
On 8-Dec-05, at 3:57 AM, .::welemski::. wrote:
Hi,
I am using WODisplayGroup to display all the items in my Entity.
I am able to delete using "selectObject(EntityName) then calling
the delete() method"
Is it possible to do a multiple deletion using WODisplayGroup with
checkbox?
Grab an array of them first:
1. Add code like this:
public NSMutableArray selectedItems;
public void setSelectedItem(boolean selected) {
boolean hasItem = selectedItems.containsObject(listEnumerator);
if (selected) {
if (! hasItem) {
selectedItems.addObject(listEnumerator);
}
} else if (hasItem) {
selectedItems.removeObject(listEnumerator);
}
}
public boolean selectedItem() {
if (selectedItems.containsObject(listEnumerator)) {
return true;
}
return false;
}
2. Bind to your WOCheckbox to selectedItem:
3. Iterate through the selctedItems array and do what you will...
--
;david
--
David LeBer
Codeferous Software
'co-defer-ous' adj. producing or containing code
site: http://www.codeferous.com
blog: http://david.codeferous.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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