Re: manage_changeProperties and getitem
Maik, Sorry, I said 'method' to be short, it isn't in fact a DTML method but an EasyNewsItem (EasyPublisher) which **can** have properties. ________________________________________________________________________________________________________ I have a form which calls up a method and fills in the form fields with the properties, in order for modification. The field jref picks up the id of the method called. I am now having difficulties to change the properties of the method (in the same folder as the form) with the following script: request=context.REQUEST jref=request.jref jtitle=request.jtitle cname=request.cname etc. etc. job=context.getitem(jref) job.manage_changeProperties( title=jtitle, navigation_title=jtitle, cname=cname, etc. etc. ,) I get the following error: Error Type: AttributeError Error Value: getitem I tried also doing job=context[jref] but that doesn't work either... TIA Marie Robichon Web Task Force European Synchrotron Radiation Facility BP 220 38043 Grenoble Cedex France Tel: (33) 04 76 88 21 86 Fax: (33) 04 76 88 24 27
Marie Robichon wrote:
I have a form which calls up a method and fills in the form fields with the properties, in order for modification. The field jref picks up the id of the method called.
job=context.getitem(jref) I get the following error:
*Error Type: AttributeError Error Value: getitem
I tried also doing job=context[jref] but that doesn't work either...
Hi Marie, Please try: job=getattr(context,jref) and just another one: could you stop posting HTML-Mails... It's no fun to read or answer HTML-Mails... -mj -- German Zope User Group http://www.dzug.org/
participants (2)
-
Maik Jablonski -
Marie Robichon