[Zope] Re: manage_changeProperties and getitem

Marie Robichon robichon@esrf.fr
Tue, 19 Nov 2002 14:50:36 +0100


--=====================_23286815==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

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 
--=====================_23286815==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
Maik,<br>
<br>
Sorry, I said 'method' to be short, it isn't in fact a DTML method but an
EasyNewsItem (EasyPublisher) which **can** have properties.<br>
<br>
<br>
________________________________________________________________________________________________________<br>
<br>
I have a form which calls up a method and fills in the form fields with
the properties, in order for modification.&nbsp; The field jref picks up
the id of the method called.<br>
<br>
I am now having difficulties to change the properties of the method (in
the same folder as the form) with the following script:<br>
<br>
request=context.REQUEST<br>
<br>
jref=request.jref<br>
jtitle=request.jtitle<br>
cname=request.cname <br>
etc. etc.<br>
<br>
job=context.getitem(jref)<br>
<br>
job.manage_changeProperties(<br>
title=jtitle,<br>
navigation_title=jtitle,<br>
cname=cname, <br>
etc. etc.<br>
,)<br>
<br>
I get the following error:<br>
<br>
<b>Error Type: AttributeError<br>
Error Value: getitem<br>
<br>
I tried also doing job=context[jref] but that doesn't work 
either...<br>
<br>
TIA<br>
<br>
<br>
<br>
</b><br>
<div>Marie Robichon</div>
<br>
<div>Web Task Force</div>
<div>European Synchrotron Radiation Facility</div>
<div>BP 220</div>
<div>38043 Grenoble Cedex</div>
<div>France</div>
<br>
<br>
<div>Tel: (33) 04 76 88 21 86</div>
Fax: (33) 04 76 88 24 27
</html>

--=====================_23286815==_.ALT--