Hi Zopers, I want to add property "SiteUrl" to a propertysheet. I want property "SiteUrl" value to be equal to Property "url" value. How can I do this programatically. I think of just renaming my "url" property to "SiteUrl" but there is no way to do that on ZClass management interface. I do not want to go throw my 779 objects and copy+paste... I've this problem do to legacy. Because I have 779 objects with a property "url" that must be changed to another name but keep the same value. Must be changed to another name because My class is now CatalogAware and this base class already have a function named "url", which conflits with my property "url". Any help? Thanks. Julio Dinis Silva ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
You can use a fairly simple DTML conversion routine... (completely untested, but it should give you an idea) <dtml-in "Catalog({'metatype' : 'YourZClassMetaType'})"> <dtml-with "getobject(data_record_id_, REQUEST)"> <dtml-call "propertysheets.YourPropertySheet.manage_changeProperties({'SiteUrl' : obj.url})"> </dtml-with> </dtml-in> Kevin ----- Original Message ----- From: "julio dinis" <juliodinis@hotmail.com> To: <zope@zope.org> Sent: Thursday, May 04, 2000 11:56 AM Subject: [Zope] Change ZClass Properties
Hi Zopers,
I want to add property "SiteUrl" to a propertysheet. I want property "SiteUrl" value to be equal to Property "url" value. How can I do this programatically. I think of just renaming my "url" property to "SiteUrl" but there is no way to do that on ZClass management interface. I do not want to go throw my 779 objects and copy+paste...
I've this problem do to legacy. Because I have 779 objects with a property "url" that must be changed to another name but keep the same value. Must be changed to another name because My class is now CatalogAware and this base class already have a function named "url", which conflits with my property "url".
Any help? Thanks.
Julio Dinis Silva
________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
julio dinis -
Kevin Dangoor