[Zope-dev] ZPatterns ProperySheet usage example?

Phillip J. Eby pje@telecommunity.com
Mon, 05 Jun 2000 15:07:04 -0500


At 05:07 PM 6/5/00 +0800, Mike wrote:
>Hello people,
>
>could anybode give an example (in code) on subject?
>

This isn't exactly code, but...

Set up a LoginManager with a GenericUserSource, and set up the GUS to have
users.  Make sure that the GUS has a "Persistent Sheet Provider" on the
"Sheet Providers" tab.  Then go to:

/acl_users/someuser/propertysheets/manage_addPropertySheet?id=sheetname&ns=

You should get a screen that says "OK".

Then go to:

/acl_users/someuser/propertysheets/sheetname/manage

And you should see a propertysheet editor for your new sheet.
(Unfortunately, it  won't let you edit anything unless your user class is
based on PropertyManager, due to an oversight in ZPatterns 0.3.0; the
VirtualSheets class needs "def propertyLabel(self,id): return id" to work
with the default Zope UI for a non-ZClass property sheet.)

Or go to:

/acl_users/someuser/propertysheets/manage

And you should see your new propertysheet listed on the sheets management
interface (which is somewhat broken, but that's because the basic one in
Zope is, it's not ZPatterns' fault. ;) )

Anyway, this is all very primitive but should get better in later versions.
 0.4.0 fixes the 0.3.0 and either it or 0.5.0 will replace the broken
propertysheets/manage screen with one that will let you add/edit/delete
sheets properly.