[Zope] ObjectManager example needed

Paul Winkler pw_lists at slinkp.com
Tue Nov 25 13:19:12 EST 2003


On Tue, Nov 25, 2003 at 09:17:03AM -0800, Dylan Reinhardt wrote:
> Using my data model, let's say Aida has a "piece_composer" property of
> 'Verdi' and there is a Verdi object in the Composers folder, a peer to
> the Pieces folder.  To render useful composer information in a Piece
> object's interface, all you need to do is something like:
> 
> -----
> 
> <B>Composer</B>:
>   <dtml-call "REQUEST.set('compsr_obj', _[piece_composer])">
>   <a href=Composers/<dtml-var "compsr_obj.getId()">
>   ><dtml-var "compsr_obj.title"></a>
> -----
> 
> And you're done.  Each piece displays its composer and links to the
> composer detail screen.  Data management is practically transparent.

The more interesting problem is to find all pieces
composed by Verdi.
Fortunately, I can give the solution in one word: ZCatalog.

you'd want your objects to inherit CatalogAware, of course.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's NOT SO UGLY MASTICATOR!
(random hero from isometric.spaceninja.com)



More information about the Zope mailing list