Simple q'n but driving me crazy
I tried several things but none gave a good result :-( I've a property sheet call InstanceConstants. Assume there is a property called 'Category'. Now how can I automatically fill this value with a string, thus not through addForm (user intervention)? eg. Category = 'TEST' I assume this piece of code has to be placed in the _add method, but how does it look like? <dtml-call "REQUEST.set('Category','TEST')"> doesn't work and all my other trials with using the propertysheets names etc don't work either :-( Tom.
----- Original Message ----- From: "Tom Deprez" <tom.deprez@uz.kuleuven.ac.be> To: <zope@zope.org> Sent: Monday, February 28, 2000 9:39 AM Subject: [Zope] Simple q'n but driving me crazy
I assume this piece of code has to be placed in the _add method, but how does it look like?
<dtml-call "REQUEST.set('Category','TEST')">
doesn't work and all my other trials with using the propertysheets names etc don't work either
Hmm... This should work. The _add method is the right place for it. Are you doing something like: <dtml-call "propertysheets.YourPropSheet.manage_editProperties(REQUEST)"> ?? Kevin
Tom Deprez schrieb:
I tried several things but none gave a good result :-(
I've a property sheet call InstanceConstants. Assume there is a property called 'Category'.
Now how can I automatically fill this value with a string, thus not through addForm (user intervention)?
eg. Category = 'TEST'
I assume this piece of code has to be placed in the _add method, but how does it look like?
<dtml-call "REQUEST.set('Category','TEST')">
doesn't work and all my other trials with using the propertysheets names etc don't work either :-(
In your constructor method you something like <dtml-with "Your_Zclass.createInObjectManager(REQUEST['id'], REQUEST)"> <dtml-call "REQUEST.set('Category','TEST')"> <dtml-call "propertysheets.InstanceConstants.manage_editProperties(REQUEST)"> </dtml-with> should work. There's a short description about this in the constructor method, when it is added to your ZClass by default. hth, Thomas
participants (3)
-
Kevin Dangoor -
Thomas Weiner -
Tom Deprez