Personal tools
You are here: Home Lists ZPUG DC List Archives 2005 2005-10 pupq - you write... / Jonah Crawford <jonah@newuses4.info>
Navigation
Log in


Forgot your password?
New user?
Mailing Lists
You can read our ZPUGDC mailing list archives online.
You can subscribe to our mailing list:
Book Review

The Definitive Guide to Plone

Reviewer: joel
 

pupq - you write... / Jonah Crawford <jonah@newuses4.info>

pupq - you write...
Jonah Crawford <jonah(at)newuses4.info>
2005-10-17 15:44:20 [ FULL ]
here - http://plone.org/documentation/archetypes/wiki/TitleLessType


"First, the warning: it's not a good idea to override a setSomeField 
() method and, inside of that, say something like  
"self.someField=...". When you do this, you're breaking the natural  
ability that Archetypes has to use different kinds of storage, and  
you're forcing it to use AttributeStorage?. An Archetype class that  
does this would not work with SQLStorage or any other other storage  
types. Instead, say "self.getField(someField).set(self, value)". Now,  
you're letting Archetypes do the actual setting, and it will work  
with other storage mechanisms."

How would I add this as an action so that self.getField('title').set 
(self, value) occurs right after the form has been submitted as  
opposed to making it a function and only being able to call it from  
outside the script as a method on the object itself.

Does that make sense ?

Jonah



Jonah Crawford
co-founder NewUses4.info
jonah(at)newuses4.info
202.487.9109
Attachments: 
text.html text/html - 4324 Bytes

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: