manage_changeProperties doesn't for my zclass
Hi, I'm another newbie with a dumbass question. I've got a folder, listitems, which only contains objects of type mailitem. I'm cloning an instance of mailitem which lives outside the folder into it <dtml-with listitems> <dtml-with "manage_clone(mailitem,REQUEST['email'],REQUEST)"> So far so good. The new mailitem is created with email as the id. Then I want to set two more properties from REQUEST variables. <dtml-call "manage_changeProperties({ firstname : REQUEST['firstname'], lastname : REQUEST['lastname'] })"> </dtml-with> </dtml-with> But even though it (presumably) executes without errors it just never works. I know I'm missing something really basic here. Any help would be appreciated. And yes I realize this is not a terribly good real-world solution but I'm trying to bring myself up to zope speed with a simple mailing list service. One other thing: It seems to me that the general case of populating an arbitrary number of object properties with REQUEST values could be served by a method which iterates over an object's properties to obtain their names and then gets their values from the REQUEST namespace, assuming that the property and the form variable names are exactly the same. I don't quite understand how to do that yet but if anyone cares to create some dtml to do that I am at the point where it would be really helpful. TIA Thayer
----- Original Message ----- From: "Thayer Gignoux" <tlg@teleport.com> To: <zope@zope.org> Sent: Wednesday, February 16, 2000 7:55 PM Subject: [Zope] manage_changeProperties doesn't for my zclass
<dtml-call "manage_changeProperties({ firstname : REQUEST['firstname'], lastname : REQUEST['lastname'] })">
But even though it (presumably) executes without errors it just never
works.
I know I'm missing something really basic here. Any help would be appreciated. And yes I realize this is not a terribly good real-world solution but I'm trying to bring myself up to zope speed with a simple mailing list service.
This is a really easy one to miss. It should be: <dtml-call "manage_changeProperties({ 'firstname' : REQUEST['firstname'], 'lastname' : REQUEST['lastname'] })"> Note the quotes around firstname and lastname. It was evaluating those variable, so it was essentially trying to set properties called "Thayer" and "Gignoux". Kevin
participants (2)
-
Kevin Dangoor -
Thayer Gignoux