[Zope] managing properties dynamically

Heiko Stoermer heiko@mig.net
Fri, 27 Aug 1999 16:26:58 +0200


another one from me...  :-)

I have a form that contains input fields for some values (say 'header'
and  'text').
After submitting the form I have to manage_changeProperties() of an
object that has the above properties, but also many more. Of course only
the property values entered in the form are supposed to be changed.
now comes the tricky bit:
the method that is supposed to change properties does know the target
object, but it does not yet know which properties are to be changed.
These are defined dynamically in the preceding form (and there exist
various of these).
In theory the solution is pretty simple:
<with target object>
    <in propertyItems() of the target object>
        <if there is a corresponding form field in REQUEST>
-->         manage_changeProperties(current property = REQUEST[current])

        </if>
    </in>
</with>

The arrow indicates the "problem area":
I have the name of the property (and thus the name of the input field)
in a variable called "current".

if if put
<!--#call "manage_changeProperties(current=REQUEST[current])"-->
nothing happens. Zope simply runs over the code and does _nothing_.

What goes wrong here, and how do I get it running?

Thanks so far,
Heiko

--
Heiko Stoermer
MIG Augsburg