A propertyView specifies the JSP fragment that renders a specific property in an itemView. It also identifies the property’s mode and data type. For example, a propertyView can specify a JSP fragment that is used to edit a string or view a boolean value.
A propertyView defines an attribute map of values that are used in the JSP to control how the property is presented—for example, by specifying the number of rows and columns for displaying a text area.
Note: To find the JSP fragment that is used to render a specific property, display the page source and search for the label of the property you are interested in. Default views surround page fragments with comments such as the following:
<!-- Begin jsp URI /html/views/property/bigstring/htmlEdit.jsp -->
<!-- End jsp URI /html/views/property/bigstring/htmlEdit.jsp -->
Item Descriptor Definition
The propertyView
item descriptor is defined as follows in ViewMapping.xml
:
<item-descriptor name="propertyView" display-property="name" query-cache-size="300"> <table name="vmap_pv" type="primary" id-column-name="id"> <property name="id" column-name="id" data-type="string"/> <property name="type" column-name="type" data-type="string"/> <property name="name" column-name="name" data-type="string"/> <property name="description" column-name="description" data-type="string"/> <property name="uri" column-name="uri" data-type="string"/> <property name="applicationName" column-name="app_name" data-type="string"/> <property name="isDefault" column-name="is_default" data-type="boolean"/> <property name="isReadOnly" column-name="is_readonly" data-type="boolean"/> <property name="isComponentPropertyView" column-name= "is_component" data-type="boolean"/> <property name="mode" column-name="mode_id" required="true" item-type="mapMode"/> </table> <!-- attributes property --> <table name="vmap_pv2pvad_rel" type="multi" id-column-name="view_id" multi-column-name="name"> <property name="attributes" component-item-type="propertyViewAttributeDefinition" column-name="attr_id" data-type="map" cascade="update,delete"/> </table> </item-descriptor>
propertyView Properties
propertyView properties include the following:
Property | Description |
---|---|
| The data type to which this view applies. |
| The name for the view in the ACC. |
| Optional description of the propertyView. |
| The URI of the JSP that renders this view. |
| Name of the Web application where this view resides. The value is the display name defined for the application in its |
| A boolean property, where true specifies to use this view as the default for this property, when in the specified mode. |
| A boolean property, where true specifies to disallow editing of this view. |
| A boolean property, where true specifies this view is used for a component property (component of a collection). |
| The map mode to use for this view. For more information, see Map Modes. |
| Optional key/value pairs that define an attribute of this propertyView. |
Example: Setting propertyView Properties for an HTML Editor
The following table shows the WYSIWIG HTML Editor
propertyView—the default HTML editor that is used in the Business Control Center to edit big string
properties:
Property | Setting |
---|---|
| big string |
| WYSIWYG HTML Editor |
| WYSIWYG HTML editor for big string properties |
|
|
| true |
| true |
| false |
| Publishing Portlets |
| edit |
| key/value pairs that define this property editor’s attributes; see the example that follows. |
The following table shows the attributes
property keys that are set to control the display and behavior of the propertyView WYSIWYG HTML Editor
:
Key | Value |
---|---|
| Height of applet, in pixels |
| Width of applet, in pixels |
| Number of columns |
| Default value for field |
| Spell check dictionary to use |
| Maximum length of the data in the field |
| Number of rows |
| Switch to show the applet in simple mode |
| Allow spell check on the field |
| Text to display above the field |
| Text to display below the field |
| Replacement field title |
Note: When specifying a property name in a propertyView
item, use the property’s actual name as specified in the repository, which can differ from its display name in the Business Control Center. You can determine a property’s name through the Dynamo Server Admin: in the Component Browser, navigate to the repository that contains the asset type you are working with.
Hiding Properties
By default, the standard views display all asset properties. To prevent display of a property in the Business Control Center, set up a propertyViewMapping for that property and map it to a Hidden propertyView. You can also use the tag pws:categorize to restrict the properties that appear on a page, individually or by category.
Sorting Properties
The order in which properties appear on a page is controlled by the tag pws:categorize, which includes attributes for sorting properties by their category
value in the repository definition file.