[Zope] Re: tree from catalog searchresults

Dieter Maurer dieter at handshake.de
Tue Dec 2 13:37:57 EST 2003


Bories v. dem Bussche wrote at 2003-12-1 21:50 +0100:
 > ...
 >  From a catalog search I retrieve a list of objects, which all have a 
 > method that I can use for accessing the branches. My problem is how to 
 > properly construct a root element, that stays accessible while a user 
 > expands and collapses the branches of the tree.

Each "expand/collapse" is a separate request.

The standard way is to redetermine the hierarchical structure
(as far as necessary). In your case, this would mean, the
catalog search is performed in each request.

 > I suppose I have to wrap the list, resulting from the catalog query, 
 > into a temporary, session based object. This wrapper should have the 
 > same child access method, as the objects resulting from the catalog query.

That may be a second step optimization.

First implement your task in a straight forward way.
When this is too slow, think about optimizations...

-- 
Dieter



More information about the Zope mailing list