[Zope-CMF] LazyFilter and Effective Dates

Tres Seaver tseaver@zope.com
10 Jun 2002 09:14:21 -0400


On Sun, 2002-06-09 at 19:13, seb bacon wrote:
> Carl Rendell wrote:
> > In sort, this allows me to obtain objects from a folder regardless of 
> > those objects being cataloged, yet still have the filters provided by 
> > 'searchContents()'. Folders for example are NOT cataloged so a catalog 
> > search would not work for that case.
> > 
> > If anyone things this is completely out of wack, on the wrong tack, or 
> > something else... Please let me know.
> 
> You're on the right tack, have you got it working yet?
> 
> > BTW: it took a lot of digging to find the bits needed for this, should 
> > it be an example on zopelabs or a how to?
> 
> Both if you have time :)  Personally, I can't think of any circumstances 
> where you wouldn't want this to be the default behaviour of 
> objectValues.  I'd even suggest putting it into the CMF, but it may 
> break things for existing applications (though again, I can't imagine 
> how..?)

It is kind of tricky;  implementing the filter in
'PortalFolder.object{Ids,Values,Items}' hardwires a policy into the
class, which is probably not cool (and we would want to use
'content{Ids,Values,Items}' anyway, lest we break the ZMI somehow).

I think that this is a good case for a utility component, implemented
much as Carl's PythonScript, which allows the policy to be pluggable.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com