Property display element

The property display element (<PropertyDisplay>) describes the display information for a specific property.

This element has the following attributes.

  • propertyname – Specifies which property name to display.
  • sortorder – An optional attribute to define sort order of property changes. Lower values appear visually first. The value 1 is the highest priority sort order.
  • label – An optional Gosu expression that specifies the label of the node. The label expression takes two arguments, the entity and the property, and returns the String to use for the Label column when generating nodes for this property. If you do not specify this attribute or set it to null, the default behavior is described below. The first rule in the list that applies is used.
    • Use a matching CovTermPattern name if applicable.
    • Use a display key of the form displaykey.entity.TYPE_NAME.PROPERTY_NAME if one exists.
    • Use the property’s Name property as defined in the data model. However, PolicyCenter inserts space characters before each capitalized letter other than the initial character.
  • value – An optional Gosu expression that determines what text to display. The expression takes three arguments, an entity, a property name, and a value. It returns the String to use for the property when generating nodes. PolicyCenter calls this expression once for each branch that it compares. If comparing two branches, PolicyCenter calls this expression once to display Value1 (typically the left column) and once to display Value2 (typically the right column). If you do not specify this attribute or set it to null, the default behavior is described below. The first rule in the list that applies is used.
    • Use a matching CovTermPattern.DisplayValue display value property, if applicable.
    • Display Boolean values as either Yes or No.
    • Typekeys use their Name property instead of the Code or Description properties. You can configure this value with a display key.
    • Dates use the format in the system configuration parameter DefaultDiffDateFormat. The default format is "short."
    • Convert the value to a String.

    If you provide a value Gosu expression, none of the default display logic applies for Boolean values, typekeys, or dates. If you want this display logic, you must explicitly replicate this display logic in the Gosu expression.

<Properties includefromtype="PAVehicleModifier" parentpath="ENTITY">
  <PropertyDisplay propertyname="TypeKeyModifier" value="
    if (ENTITY.Pattern == &quot;PAPassiveRestraint&quot;) {
    return (VALUE as PassiveRestraintType).DisplayName
    } else if (ENTITY.Pattern == &quot;PAAntiTheft&quot;) {
    return (VALUE as AntiTheftType).DisplayName
    } else {
      return VALUE as String
    }
  "/>
</Properties>