• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OR searches using DisplayGroups
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OR searches using DisplayGroups


  • Subject: Re: OR searches using DisplayGroups
  • From: David Holt <email@hidden>
  • Date: Fri, 22 Jan 2010 09:59:25 -0800

Of course!

In my opinion DisplayGroups are grossly underused given the amount you can do with no code. As Chuck suggested, it is probably time to at least start a wiki page on them.

Thanks!

David

On 22-Jan-10, at 8:47 AM, Fredrik Lindgren wrote:

Some time ago I made an extension to the WODisplayGroup with support for a queryMatchAll dictionary. This extension makes it possible to have a search string like: "fault, error, -letter," - which creates a qualifier that finds records with the text string "fault" and "error" and excludes "letter". It also has support for operators like '<' and' >'.

Really handy!

It also adds a qualifiedObjects() method to see all the objects this display group has regardless of the qualifier.

I am using this for in memory searching on a table with >500 000 records, and it works quite well.

If anyone is interested, I am willing to share... Its really a simple extension. After finding out about ERXDisplayGroup I had been meaning to use that as a base. However I have not had the time to make the adjustments.

Anyone interested? It can of course be extended with more cool search ideas!

/Fredrik Lindgren

21 jan 2010 kl. 22.17 skrev David Holt:

Hi all,

I needed to include an OR search on a component that had been created using the queryMatch functionality of WODisplayGroup.

As you know if you create such things, by default any values included in the queryMatch search fields are joined in "AND" searches by default. This is a limitation that I've tried to work around without resorting to programatically setting the qualifier and fetch on the displayGroup for a very long time.

In my travels I discovered that ERXDisplayGroup in Wonder allows you to add qualifiers to the WODisplayGroup's generated qualifier. Instead of using queryMatch on the relevant fields I used a local variable to then programatically create the OR qualifier I needed. If you use the method "setQualifierForKey" you add your new qualifier(s) to a dictionary called _extraQualifiers. These are added to the generated qualifierFromQueryValues just before the displayGroup is qualified. After the DG is qualified, you may want to reset the _extraQualifiers dictionary using clearExtraQualifiers.

Anyway, it is really slick because it saved me having to code the search page by hand and I wanted to point it out since I didn't see anything obvious in the archives about the use of these methods.

David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40timeoff.se


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:
@mac.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
  • Follow-Ups:
    • Re: OR searches using DisplayGroups
      • From: Fredrik Lindgren <email@hidden>
References: 
 >OR searches using DisplayGroups (From: David Holt <email@hidden>)
 >Re: OR searches using DisplayGroups (From: Fredrik Lindgren <email@hidden>)

  • Prev by Date: Re: OR searches using DisplayGroups
  • Next by Date: Re: OR searches using DisplayGroups
  • Previous by thread: Re: OR searches using DisplayGroups
  • Next by thread: Re: OR searches using DisplayGroups
  • Index(es):
    • Date
    • Thread