Re: More newbie questions
Re: More newbie questions
- Subject: Re: More newbie questions
- From: Sacha Michel Mallais <email@hidden>
- Date: Tue, 15 Nov 2005 15:21:38 -0800
On Nov 15, 2005, at 2:46 PM, Randy Becker wrote:
Firstly, is there an EOUtilities function to return objects that
match multiple criteria? Or do I have to use lower level methods?
Yes, you're using it below: objectsWithQualifierFormat()...
Right now I've got:
String format = "title caseInsensitiveLike %s";
NSArray args = new NSArray(searchQuery);
return EOUtilities.objectsWithQualifierFormat( session
().defaultEditingContext(), "Item", format, args);
but I'd like to do something like
String format = "(title caseInsensitiveLike %s) OR (title
caseInsensitiveLike %s)";
That exact format string will work. The only difference is you'll
need to include a second argument for the second %s.
Secondly, how can I display data from an object related to one that
is displayed in a WORepetition. Right now, I'm only able to access
the attributes of a particular object I'm outputting, and the
information I'd like to display is located in a related object.
Through the magic of Key Value Coding. If you have two objects a and
b, where a relates to b, and where both have a "name" attribute, then
all the following will work:
key path gives
----------------------------------------
a the object a
a.name a's name
a.name.length a's name's length
a.b the b that is related to a
a.b.name the name of the b that is related to a
And finally, how can I do something like the WOExamples
WXCheckBoxList - I tried importing some of the frameworks in the
examples project, but couldn't get it to work - what I want to do
is present a list of checkboxes with a single submit button that
will perform an action on all of the objects represented by the
selected boxes.
Hmm, probably easiest just to do this yourself in the submit action
method.
sacha
--
Sacha Michel Mallais 400 lb. chimp
Global Village Consulting Inc. http://www.global-village.net/
PGP Key ID: 7D757B65 AIM: smallais
Choke on that, causality! -- the Professor, "Futurama"
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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