[Zope] Fw: ZTopics and Canned Queries

Shalabh Chaturvedi shalabh@pspl.co.in
Wed, 17 May 2000 17:37:06 +0530


Sorry my earlier post got cut off in the middle:

I wrote:
> Hello all,
>
> I have been trying to use ZTopics to create views for my issue tracker
> product
> and have come across a limitation. In a ZTopic object, the query is entirely
> hardcoded, whereas what I need is a 'parameterized' query where the value of
> a
> filter may be supplied through the REQUEST at call time.
>
> For example, I can create a ZTopic called FilterCreator: (creator :
> 'shalabh')
> Now http://url/FilterCreator will return all cataloged objects with
> creator=='shalabh'.
>
> What I want to do is create: (creator : creatorName)
> And use http://url/FilterCreator?creatorName=shalabh
>
> Currently ZTopic does not allow me to create an object like above as it tries
> to evaluate the query at creation time.

I have modified my local copy of ZTopics to do what I need. Now I have an extra
checkbox that allows creation of 'parameterized' ZTopics. When it is checked,
caching is turned off and REQUEST is also looked up during construction of the
query at run time.

Does anyone else find this useful? I know this product is unsupported but is it
possible (or worth it) to submit this as a patch?
Are there other products that might achive the same (any kind of 'search
objects' or 'canned queries')?

Thanks,
Shalabh