Re: Qualifiers LIKE problem
Re: Qualifiers LIKE problem
- Subject: Re: Qualifiers LIKE problem
- From: Mark Morris <email@hidden>
- Date: Thu, 7 Apr 2005 11:25:14 -0500
I was away from my computer when it hit me: The single quotes. So,
nevermind! ;-) I guess both should work.
Regards,
Mark
On Apr 7, 2005, at 11:03 AM, Mark Morris wrote:
Hello Greg,
Also, shouldn't it be:
private void setFilterToLetter( String letter ) {
filter = EOQualifier.qualifierWithQualifierFormat( "lastName like
'%@*'", new NSArray( letter ) );
}
Or else you're giving it the String object "lastName" to which to
compare. (Am I missing something, Chuck?)
Regards,
Mark
On Apr 7, 2005, at 12:00 AM, Chuck Hill wrote:
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:
email@hidden
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