Re: Qualifiers LIKE problem
Re: Qualifiers LIKE problem
- Subject: Re: Qualifiers LIKE problem
- From: Chuck Hill <email@hidden>
- Date: Wed, 6 Apr 2005 22:00:13 -0700
On Apr 6, 2005, at 9:41 PM, Greg wrote:
Hi,
I am trying to make a component with that has the alphabet at the top
and it will filter the EO's based on a key. I followed the example in
the EOQualifier javadoc but it seems that now records are displayed as
they aren't matching the filter for some reason. I am using postgres
if that makes a diff.
Any help is greatly appreciated.
Regards,
Greg
private void setFilterToLetter(String letter) {
Object args[] = { "lastName", letter };
filter = EOQualifier.qualifierWithQualifierFormat("%@ like '%@ '",
new NSArray(args));
Shouldn't that be
filter = EOQualifier.qualifierWithQualifierFormat("%@ like '%@*'",
new NSArray(args));
Note the '*' in the like condition.
}
public NSArray displayedObjects() {
NSArray filtered = allObjects;
if (filter != null)
filtered = EOQualifier.filteredArrayWithQualifier(allObjects,
filter);
return EOSortOrdering.sortedArrayUsingKeyOrderArray(filtered,
sortOrderings);
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden