Define an automatically generated display form.
The schemadisplay directive creates and registers a view for displaying an object based on a schema.
name
*
-
TextLine
(default =
None
)
The name of the generated view.
permission
*
-
Permission
(default =
None
)
The permission needed to use the view.
schema
*
-
GlobalInterface
(default =
None
)
The schema from which the form is generated.
class_
-
GlobalObject
(default =
None
)
A class to provide custom widget definitions or methods to be used by a custom template.
This class is used as a mix-in class. As a result, it needn't subclass any special classes, such as BrowserView.
fields
-
Tokens
(default =
None
)
Here you can specify the names of the fields you wish to display. The order in this list is also the order the fields will be displayed in. If this attribute is not specified, all schema fields will be displayed in the order specified in the schema itself.
for_
-
GlobalInterface
(default =
None
)
The interface this page (view) applies to.
The view will be for all objects that implement this interface. The schema is used if the for attribute is not specified.
If the for attribute is specified, then the objects views must implement or be adaptable to the schema.
label
-
MessageID
(default =
None
)
A label to be used as the heading for the form.
layer
-
LayerField
(default =
None
)
The later the view is in. Default: 'default'
menu
-
MenuField
(default =
None
)
Many views are included in menus. It's convenient to name the menu in the page directive, rather than having to give a separate menuItem directive.
template
-
Path
(default =
None
)
An alternate template to use for the form.
title
-
MessageID
(default =
None
)
This attribute defaults to 'Edit'.
Register custom widgets for a form.
This directive allows you to quickly generate custom widget directives for a form.
Besides the two required arguments, field and class, you can specify any amount of keyword arguments, e.g. style='background-color:#fefefe;'. The keywords will be stored as attributes on the widget instance. To see which keywords are sensible, you should look at the code of the specified widget class.
field
*
-
TextLine
(default =
None
)
The name of the field/attribute/property for which this widget will be used.
class_
-
GlobalObject
(default =
None
)
The class that will create the widget.
* = required