ATG Page Developer’s Guide

Updating Multi-Valued Properties

By default, the RepositoryFormHandler updates a property value by overwriting its old value with the new one. In the case of multi-valued properties, you can modulate this behavior in the following ways:

Add the form values to the current property values; or use the form values to remove any current property values that match.

Specify the maximum number of values to add, update, or remove.

Note: These property options are available only if the extractDefaultValuesFromItem property is set to true.

updateMode

The updateMode property specifies how changes to a property value affect existing data. You can set updateMode to one of these values:

append appends the new form values to the current ones.

prepend prepends the new form values to the current ones.

replace (the default behavior) overwrites old values with new values

remove removes any existing values that match the selected form values.

Note: If updateMode is set to append or prepend, you must also set the numNewValues attribute.

For example, the list property hobbies has the following string values:

Mountain BikingRunningCanoeing

The form contains a hidden input tag that sets the update mode for the hobbies property with the following format: