On Feb 25, 2008, at 3:44 AM, Theodore Petrosky wrote:

Now this makes no sense to me and I don't understand
what to do...

This is my method:

        public WOComponent useSearchField() {
                EOEditingContext ec =
session().defaultEditingContext();

                if (userEntries.valueForKey("client") != null) {
//only do this if there is a value in the search field
                        NSMutableArray arg1 = new NSMutableArray();
                        arg1.addObject(userEntries.valueForKey("client"));

arg1.addObject("*" + userEntries.valueForKey("client") + "*");



                        EOQualifier newQual =
EOQualifier.qualifierWithQualifierFormat
                        ("(client caseInsensitiveLike %@) AND (isComplete =
0)", arg1);
                        EOFetchSpecification fs = new EOFetchSpecification
("AsAdSched", newQual, null);

                        fs.setRefreshesRefetchedObjects(true);

                        //NSLog.out.appendln("fetchscpec = " + fs);

                        fetchResult = ec.objectsWithFetchSpecification(fs);
                }
                return null;

        }

I wish I could find examples of some of this stuff.


Chuck


Message: 3
Date: Sun, 24 Feb 2008 21:58:38 -0800
From: Chuck Hill <[EMAIL PROTECTED]>
Subject: Re: creating my EOQualifier in code
To: WebObjects-Dev List
<[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes;
format=flowed

And I think you need to add the *...* to the value in
arg1, not the
format.


On Feb 24, 2008, at 9:32 PM, Mike Schrag wrote:

% is SQL syntax ... In EOQualifier syntax, you want
to use *

ms

On Feb 25, 2008, at 12:28 AM, Theodore Petrosky
wrote:



I am using the caseinsensitiveLike however I can
not
get the global '%' to work...

EOQualifier newQual =
EOQualifier.qualifierWithQualifierFormat
("(client caseInsensitiveLike [EMAIL PROTECTED]) AND (isComplete
=
0)", arg1);


______________________________________________________________________ ______________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/ newsearch/category.php?category=shopping


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to