Re: WOCheckBox Howto?
Re: WOCheckBox Howto?
- Subject: Re: WOCheckBox Howto?
- From: Mark Morris <email@hidden>
- Date: Sat, 25 Feb 2006 01:39:19 -0600
Hello Jim,
You can use the "isChecked" binding to do this.
For example, bind it to a method named "companyIsInArray". Assume
your WORepetition's "item" binding is set to "currentCompany", and
the destination (mutable) array is called "companyArray". Then write
something like (warning, not debugged!):
public boolean companyIsInArray() {
return companyArray.containsObject( currentCompany );
}
public void setCompanyIsInArray( boolean value ) {
if( value && !companyIsInArray() ) {
companyArray.addObject( currentCompany );
}
if( !value && companyIsInArray() ) {
companyArray.removeObject( currentCompany );
}
}
This would do what you want.
Regards,
Mark
On Feb 24, 2006, at 11:34 PM, Jim Wong wrote:
I want to display a list of objects from entity COMPANY. the list
will be displayed using WORepetition. Each line will contain the
companyName and a WOCheckBox. When "GO" button is clicked, I want
to pass all the selections into a NSMutableArray. But I dunno how
to code this. ANyone can help? Thanks.
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40onpointsoftware.com
This email sent to email@hidden
_______________________________________________
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