[Zope-dev] Objects that are properties
Steve Spicklemire
steve@spvi.com
Wed, 8 Nov 2000 11:02:02 -0500 (EST)
Hi Roche,
This is a known problem. Use:
<dtml-let itemIDs="[]">
<dtml-in "addressRack.getPersistentItemIDs()" sort>
<dmtl-call "itemIDs.append(_['sequence-item'])">
</dtml-in>
Now you have the required itemIDs in itemIDs.
</dtml-in>
-steve
>>>>> "Roch'e" == Roch'e Compaan <roche@ybm.co.za> writes:
Roch'e> I have a Customer and Address ZClasses based on Dataskin
Roch'e> as well as a CustomerManager specialist.
Roch'e> The Customer ZClass has a external method setAddress:
Roch'e> def setAddress(self, Address) self.Address = Address
Roch'e> CustomerManager has a defaultRack and addressRack. The
Roch'e> methods that adds the instance contains this:
Roch'e> <dtml-let newCustomer="newItem(name)"> <dtml-call
Roch'e> "newCustomer.propertysheets.Basic.manage_changeProperties(test=test)">
Roch'e> <dtml-let address="addressRack.newItem(id)"> <dtml-call
Roch'e> "address.propertysheets.basic.manage_changeProperties(test=test)">
Roch'e> <dtml-call "newCustomer.setAddress(address)"> </dtml-let>
Roch'e> </dtml-let>
Roch'e> and it seems to work fine.
Roch'e> Then to retrieve the Customer addresses I call:
Roch'e> <addressRack.getPersistentItemIDs()">
Roch'e> but there seems to be a problem with permissions because
Roch'e> Zope prompts me for username and password although i'm
Roch'e> already working in the management interface.
Roch'e> Roché
Roch'e> _______________________________________________ Zope-Dev
Roch'e> maillist - Zope-Dev@zope.org
Roch'e> http://lists.zope.org/mailman/listinfo/zope-dev ** No
Roch'e> cross posts or HTML encoding! ** (Related lists -
Roch'e> http://lists.zope.org/mailman/listinfo/zope-announce
Roch'e> http://lists.zope.org/mailman/listinfo/zope )