Map modes provide symbolic names used to categorize itemViews and propertyViews by function. The following map modes are supplied with ATG Content Administration:

Item Descriptor Definition

The mapMode item descriptor is defined as follows in ViewMapping.xml:

<item-descriptor name="mapMode" display-property="name" query-cache-size="10">
  <table name="vmap_mode" type="primary" id-column-name="id">
    <property name="id" data-type="string"/>
    <property name="name"/>
    <property name="description"/>
    <property name="fallbackMode"
      column-name="fallback_id" item-type="mapMode"/>

Map modes can include a fallback mode, which identifies the mode that should be used if a default propertyView is not found in the primary mode. This behavior can be used to minimize the number of default propertyViews that an application requires. Fallback modes are searched recursively until a mode with an empty fallback mode or a mode that has already been encountered is reached.

You can add new map modes if required. The following example assumes you have a business requirement to display asset properties so that they fit in a limited amount of space. It shows the basic steps for setting up a new map mode to fulfill this requirement and specify its fallback mode—in this case, view.

  1. Create the item for the new mode—in this example, condensedView –and set its fallback mode to view.

  2. In the appropriate JSP, add a getItemMapping tag with a mode parameter set to condensedView:

    <biz:getItemMapping var="imap"
       mode="condensedView" item="${item}"/>

  3. Create propertyView items that truncate potentially large data values, and set their mode to condensedView.

Note: You can also set the fallback mode within the getItemMapping tag. For example:

<biz:getItemMapping var="imap" mode="condensedView"