home contents changes options help subscribe edit (external edit)

A property is a usually small piece of (meta) information associated with an object. The "meta" indicates that this information is in addition to the primary object "content"; it provides additional aspects about the object. "title", "author", "version", "publishing state" would be property examples.

A PropertyManager manages a set of properties. Properties have a type and a value. Modification or deletion of a property can be restricted. The type is from the list float, int, long, string, lines, text, date, tokens, selection, multiple selection. Properties can be predefined by an object or defined dynamically either through the web or programmatically.

Properties are either predefined or are created with the method manageaddProperty. Property ids must not start with and must not contain space, in addition to the restrictions spelled out for ObjectManager ids.

PropertyManager has methods propertyIds, propertyValues, propertyItems with similar effects as the corresponding ObjectManager methods. As for object managers, properties can be directly accessed through their ids. There are some additional methods to check for property existence, access its type and fetch its value or a default.

Properties are changed with the methods manage_editProperties or manage_changeProperties. manage_editProperties changes all properties. If no new value is given, the property is reset. This may be necessary for direct through the web editing, as HTTP requests do not have parameters for unchecked check boxes and empty multiple selections. manage_changeProperties, on the other hand, changes only properties explicitly referenced in its parameters.


comments:

... --FlorianKonnertz, Sat, 10 Apr 2004 08:48:09 -0700 reply
*(source: Building Dynamic Websites With Zope - [Building Dynamic Websites With Zope]:chap3.html#c37ac15c11b7 )



subject:
  ( 34 subscribers )