--On 4. April 2008 09:05:59 +0200 Ulla Theiss <[EMAIL PROTECTED]> wrote:
Hello List, I have to pass an instance of a self-defined class within a form to a product method. I try it in the following way: <form action="addUploadFile" enctype="multipart/form-data" target="main" method=post> <input name="doc:instance" value="<dtml-var doc>" type="hidden">
^^^^^^^^^^^^ Please don't invent new syntax or new APIs...or don't expect that stuff like this would work because you dream of it :-) And of course you can not *pass* instances in some way through HTTP. This makes totally no sense. No idea what your intention is with your code. If you specify 'addUploadFile' then this method will be called within the context of your current object. If you need to call the method within the context of an other object, specify the URL of the related object within 'action'. If you need reference another object as part of your form-data: specifiyits *path* but passing the object directly to value=".." really makes no sense. Obtain an object-by-path within your code using the restrictedTraverse() API. But for uploading data to your current context object you don't have to define something like "doc"... please refer to the "Zope Book 2.7 edition" - appearently you have a basic misunderstanding how Zope works here.
Description: PGP signature
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )