At 07:09 PM 8/2/00 -0600, Bill Anderson wrote:
>I think I have a decent handle on this concept, but something seems
lacking, I hope
>someone can clear it up :)
>So, let us say I have an object, call it a Member. :)
>And let us say I want to be able to add a property sheet to it in a
>AIUI, I should be able to add a persistent sheet provider, give it the
name I want for the
>sheet, and define the sheet?
>Geex, the more I write what I want to do, the less I feel I grasp it. :(
>Basically, let me put it this way:
>I have DataSkins (ZClasses). I have one or two property sheets that I want
most/all of the
>DS objects to have. I don't want to have to define the property sheet in
each and every
>ZClass. AIUI, PersistentSheet providers can do this. I want to do it with
the default
>ZPatterns/LoginManager includes.
>So, am I totally clueless, or am I just looking to hard, and missing
something blatantly

PersistentSheetProviders can do what you want - *but* there is one
drawback.  PSP's have no concept of a sheet schema, so you have to add the
sheet and set up its schema in code for *each instance*.  The good news is,
you can do that from an "add" trigger, by calling
self.propertysheets.manage_addPropertySheet(id='name', xmlns=''), followed
by self.propertysheets.get('name').manage_editProperties(...).  (You can
even do it as a tuple expression, i.e. just seperate the two expressions
with a comma.  Rendered in SkinScript it would look like:


(The "..." should be replaced with appropriate parameters for
manage_editProperties, of course.)  Unfortunately, this will not allow you
to initialize the property sheet contents except with constant data, data
from the instance, or from self.REQUEST.

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to