Re: [Zope] Accessing hierarchical information in a CORBA server
vonWedel@lfpt.rwth-aachen.de writes:
Dies ist eine mehrteilige Nachricht im MIME-Format. --=_alternative 0034F414C12569AB_= Content-Type: text/plain; charset="us-ascii" Can you avoid to send MIME messages into this list?
... tree for hierarchical data on CORBA server ... ... from (http://www.zope.org/Members/anthony/tree-coding-tricks: class _dummy: def __init__(self, name): self.name=name
def child_lookup(parent): c = [] for i in range(0,5): c.append(_dummy("%s.%d"%(parent, i))) return c
used like this:
<dtml-let name="0"> <dtml-tree id=name branches_expr="child_lookup(parent=name)"> <b><dtml-var name></b> </dtml-tree> </dtml-let>
.... The tree can obviously only handle functions, not real CORBA objects The tree can (and does) handle objects. The expression "branches_expr" is evaluated in the context of the current objects.
As Python is dynamically typed, the objects can have different types. The only restriction: "branches_expr" must be evaluable in each context.
CORBA objects are identified by a so-called IOR which is some sort of a stringified object reference but in a non-readable way. Can I use a non-unique 'display name' for each node in the tree and some unique identfier (the IOR) internally? Of cause, the "display names" must be locally unique (i.e. in their parent). They need not be globally unique.
Sorry for so many questions, but I haven't found a lot of info about using the dtml-tree together with external methods. I saw two questions. That's not a lot.
Dieter
participants (1)
-
Dieter Maurer