[Zope-dev] Schizophrenic ObjectManager?

Ian Beatty beatty at physics.umass.edu
Thu Mar 4 16:54:37 EST 2004


Greetings.

I'd like to create a type in a Python-based product that's kind of like two
folders fused together. What I mean by that is I've got a folderish object
type -- let's call it 'F' -- that inherits from ObjectManager. I've set it
up so that it can contain objects of type 'A' and nothing else, by using the
all_meta_types property. So far so good.

Now, I want to have it also contain objects of type 'B', but displayed and
managed through a separate tab in the ZMI. If I click on the "Contents" tab
of an instance of F, I get the list of contained A-type objects, with cut,
copy, paste, delete, etc. If I click on another tab named, say,
"OtherStuff", I want to see exactly the same kind of contents-list
management page, but for contained B-type objects.

I'm thinking that I might try having F contain an instance of ObjectManager
as a property, and delegate all B-managing functionality to that. Management
of A would be handled through F's inherited ObjectManager behavior. What
concerns me is that the "encapsulated" second ObjectManager wouldn't have a
container in the usual way, and that could seriously mess up acquisition.

Another possibility is to maintain only one collection, but to create the
illusion of two separate collections by having two copies of the contents
('manage_main') page, each modified to display only one kind of child.

Any thoughts, oh masters of Zope Zen?

Cheers,

..Ian

-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
Dr. Ian Beatty                           beatty at physics.umass.edu
Physics Education Research Group              voice: 413.545.9483
Department of Physics                           fax: 413.545.4884
Univ. of Massachusetts              AIM: (available upon request)
Amherst, MA 01003-4525 USA       http://umperg.physics.umass.edu/
-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --





More information about the Zope-Dev mailing list