[Zope-dev] Pointer or reference object
Itamar Shtull-Trauring
itamars@ibm.net
Mon, 06 Mar 2000 22:49:18 +0200
Jason Spisak wrote:
>
> Actually I'd was more thinking along the lines of the referenced object
> acting just like the object that it's linked to. Meta-type too.
>
> <dtml-in "objectValues(['MyApples'])"> will get you the references to any
> apples in that folder too. It allows you to have an object in two
> places(being a physical distinction which matters in Zope) without
> duplicating the filespace and work to create a second object.
How about a product with only two methods in the module - manage_addMirror
and manage_addMirrorForm. the form lets you choose an object somehow (by
URL?) and manage_addMirror simply adds this object? Something like:
def manage_addMirror(self, url, REQUEST=None):
"""Add a Mirror
"""
ob=REQUEST.resolve_url(url)
id=self._setObject(id, ob)
if REQUEST is not None:
try: u=self.DestinationURL()
except: u=REQUEST['URL1']
REQUEST.RESPONSE.redirect(u+'/manage_main')
return ''