[Zope] How do I set the Title property of a File object from a DTML method

magnus@websys.no magnus@websys.no
11 Nov 2000 07:12:53 +0100


[me]

| But I'm unable to set the Title property of a File object.  

[Erik]

| Is it just the title property?  All the others you can fiddle around
| with?  Try manage_changeProperties() instead.  I know (from
| lib/python/OFS/Image.py) that the File object has its own
| manage_edit() method, you could try that one.

Actually it turned out to be a different problem (I work around it
now).  My form looked something like this:

<form	action="&dtml-absolute_url;" 
	method="POST"
	enctype="multipart/form-data">

<input type="hidden" name="id" value="<dtml-var id>">
<input type="text" name="title:text" value="<dtml-var title>">
<input name="change:method" type="submit" value="Change">

</form>

and the change method something like this:

<dtml-call "manage_editProperties( REQUEST )">
<dtml-call "RESPONSE.redirect('index_html')">

Both the form and the change method would be DTML methods in my
containing ZClass object.  For my own ZClass subobjects, this worked
fine, but for a File subobject it would just show the File instead of
running the change method.  In the end I had to make the action field
in the form tag above include "/change" if the object was a File.

Could someone explain this to me?

-Magnus