The View Mapping system renders assets and their properties via itemMappings
. Each itemMapping
serves as a container within the View Mapping repository for the objects required to render an asset.
For example, the following graphic depicts how the View Mapping system might organize asset properties in two separate tabs:
The View Mapping system is three-tiered:
The asset’s
itemMapping
lists one or moreitemViewMappings
—two in this example.Each
itemViewMapping
points to anitemView
, which in turn points to a JSP fragment that is used to generate a tab. EachitemViewMapping
also lists one or morepropertyViewMappings
.Each
propertyViewMapping
points to apropertyView
, which in turn points to a JSP fragment that is used to render the property.
When a user chooses an asset in the Business Control Center, the following events occur:
The getItemMapping tag in the JSP queries the View Mapping system, passing it:
The user’s current mode—for example, edit or view
The asset’s item descriptor type
The View Mapping system returns the appropriate
itemMapping
, which serves as a container within the View Mapping repository for the objects needed to render an asset in a specific mode.On obtaining the
itemMapping
, the system finds the appropriate underlying JSP fragments.
Note: In the context of the View Mapping system, item corresponds to asset.
View Mapping Attributes and Inheritance
View mapping objects can set attributes that are passed to the corresponding JSP fragment. These attributes are added to the appropriate object through the ACC as key/value pairs and are stored in the View Mapping repository. Because the attributes are stored in the repository rather than defined in each page, you can easily adapt the appearance of assets or properties and maintain a variety of display options that suit different users and contexts.
ATG Content Administration provides itemViews
and propertyViews
with predefined attributes whose values are applied when a particular view is displayed. For example, the propertyView
WYSIWYG HTML Editor
sets a number of variables that control the editor’s appearance and behavior, such as appletHeight
, appletWidth
, dictionary
, inputFieldMaxlength
, rows
, and spellCheck
.
itemMapping
attributes are passed to each itemViewMapping
, whose attributes supersede its parent’s settings. For example, an itemViewMapping
can specify an itemView
that overrides the default itemView
used for that asset type. Each itemViewMapping
also contains settings that define the appearance of the tab, such as its display name.
propertyViewMappings
can provide property-level overrides. For example, if the property assetX.prop1
, which is a String
, requires a property editor different from the default simple String
editor, the propertyViewMapping
for assetX.prop1
can specify a propertyView
that overrides the default.
For more information on the attributes of each object, see View Mapping Repository.