Class ecm.widget._PropertiesPaneMixin

Provides a base class that contains methods for working with property attributes to be rendered.
Defined in: <ecm\widget\_PropertiesPaneMixin.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Method Summary

Method Attributes Method Name and Description
 
Clears the current property rendering.
 
createRendering(contentClass, entryTemplate, item, reason, isReadOnly, showHidden, callback, onError)
Creates the initial rendering of attributes and child components based on the content class, entry template settings, existing item attribute values, and EDS changes.
 
Retrieves the array of child component values.
 
Retrieves the properties pane property fields.
 
Retrieves the field widget for the property identified by one of the property Id strings in fieldNames.
 
getFieldWithName(fieldName)
Retrieves the field widget for the property named fieldName.
 
Retrieves the first property field widget that has an invalid value.
 
Retrieves the property Id string for the first property field that contains text values.
 
Returns the name of the field that has focus.
 
Returns the parent folder when this properties pane is used to add a new item.
 
getPropertiesJSON(includeReadonly, includeHidden, excludeEmptyValues)
Retrieves the property values JSON string.
 
getPropertyValue(fieldName)
Retrieves the value for the property field identified by fieldName.
 
isFieldDisplayed(fieldName)
Returns whether the field widget for the property named fieldName is displayed (not hidden).
 
onParentFolderChanged(parentFolder)
This event is triggered when the parent folder for a new item is changed.
 
renderAttributes(attributeDefinitions, item, reason, isReadOnly, params)
Renders the attributes.
 
renderChildComponents(childCompDefinitions, item, isReadOnly, newChildComponents, reason)
Renders the child components.
 
resize(changeSize)
 
setDisabledNavigation(disableField)
Enables or disables each data type "xs:reference" property field if it is not read only.
 
setFieldError(fieldName, errorMessage, errorValue)
Assigns an error to a property field.
 
setFieldFocus(fieldName)
Places focus in the property field identified by fieldName, if found.
 
setParentFolder(parentFolder)
Sets the parent folder when this properties pane is used to add a new item.
 
setPropertyValue(fieldName, value)
Sets the value for the property field identified by fieldName.
 
setRepository(repository)
Assigns the repository for the common properties pane.
 
validateAll(onEditStatus, onSaveStatus)
Checks if the property fields contain valid values.

Constructor Detail

ecm.widget._PropertiesPaneMixin()

Since:
2.0.3

Method Detail

clearRendering()

Clears the current property rendering.

createRendering(contentClass, entryTemplate, item, reason, isReadOnly, showHidden, callback, onError)

Creates the initial rendering of attributes and child components based on the content class, entry template settings, existing item attribute values, and EDS changes.
Parameters:
contentClass
The ecm.model.ContentClass object that provides the attribute definitions. This is required.
entryTemplate
An optional ecm.model.EntryTemplate object. If provided, the entry template attribute settings are applied.
item
An optional ecm.model.ContentItem object. If provided, the content item attribute values are applied.
reason
The reason for displaying properties. Pass "create" when creating a new content item, "checkin" when checking in a content item, "editProperties" when editing the properties of a content item, "multiEditProperties" when editing the properties of multiple content items, or entryTemplateBuilder when displaying the properties in the entry template builder.
isReadOnly
Pass true if the entire item is read only.
showHidden
Pass true to display hidden properties.
callback
An optional callback that is called after the rendering completes. The attribute definitions that were used to render the attributes are passed to the callback. The attribute definitions are a copy of the content class attribute definitions that were modified by the entry template settings, existing item attribute values, and EDS changes.
onError
A callback function called if there is an error.
Since:
2.0.3

getChildComponentValues()

Retrieves the array of child component values.
Returns:
An array of child component values. Each entry contains the set of values for the corresponding child component, in order.

getFields()

Retrieves the properties pane property fields.
Returns:
An array of field widgets.

getFieldWithEitherName(fieldNames)

Retrieves the field widget for the property identified by one of the property Id strings in fieldNames. Each property Id string in the array is checked against the property fields, starting with the first property Id string, until a matching property field is found.
Parameters:
fieldNames
An array of property Id strings.
Returns:
The first matching field widget is returned. The value null is returned if no matching property field is found for any of the string Ids.

getFieldWithName(fieldName)

Retrieves the field widget for the property named fieldName.
Parameters:
fieldName
The string Id of the property.
Returns:
The field widget for the property. The value null is returned if the property field is not found.

getFirstInvalidField()

Retrieves the first property field widget that has an invalid value.
Returns:
A property field widget.

getFirstTextPropertyName()

Retrieves the property Id string for the first property field that contains text values.
Returns:
A property Id string.

getFocusedFieldName()

Returns the name of the field that has focus.
Returns:
The property Id string.

getParentFolder()

Returns the parent folder when this properties pane is used to add a new item.
Since:
2.0.3.6
Returns:
parentFolder Returns the parent folder ecm.model.ContentItem object for the new item. The parent folder is set by the container of this properties pane. If no parent folder has been set null is returned.

getPropertiesJSON(includeReadonly, includeHidden, excludeEmptyValues)

Retrieves the property values JSON string. See ecm.widget.PropertyEditors getPropertiesJSON for more details.
Parameters:
includeReadonly
A boolean value. If true, values for read only properties are included. Otherwise read only property values are excluded from the JSON.
includeHidden
A boolean value. if true, values for hidden properties are included. The parameter excludeEmptyValues also applies to hidden properties.
excludeEmptyValues
A boolean value. If true, properties with empty values are excluded.
Returns:
The JSON string for the current state of the properties.

getPropertyValue(fieldName)

Retrieves the value for the property field identified by fieldName.
Parameters:
fieldName
The property Id string.
Returns:
The value for the property field.

isFieldDisplayed(fieldName)

Returns whether the field widget for the property named fieldName is displayed (not hidden).
Parameters:
fieldName
The string Id of the property.
Returns:
True if the field is displayed in the property table.

onParentFolderChanged(parentFolder)

This event is triggered when the parent folder for a new item is changed.
Parameters:
parentFolder
The parent folder ecm.model.ContentItem object for the new item. When provided, the parent folder Id will be included in calls to EDS.
Since:
2.0.3.6

renderAttributes(attributeDefinitions, item, reason, isReadOnly, params)

Renders the attributes.
Parameters:
attributeDefinitions
An array of ecm.model.AttributeDefinition objects. Provides the definitions for the attributes in the item parameter.
item
A ecm.model.ContentItem object.
reason
The reason for displaying properties. Pass "create" when creating a new content item, "checkin" when checking in a content item, "editProperties" when editing the properties of a content item, or "multiEditProperties" when editing the properties of multiple content items.
isReadOnly
Pass true if the entire item is read only.
params
A object containing additional parameters and objects for the properties pane. (@since 2.0.3)

renderChildComponents(childCompDefinitions, item, isReadOnly, newChildComponents, reason)

Renders the child components.
Parameters:
childCompDefinitions
An array of ecm.model.ChildComponentDefinition objects.
item
The ecm.model.ContentItem.
isReadOnly
A value of true if the entire item should be treated as read only.
newChildComponents
An array of ecm.model.ChildComponent objects for the item.
reason

resize(changeSize)

Parameters:
changeSize

setDisabledNavigation(disableField)

Enables or disables each data type "xs:reference" property field if it is not read only.
Parameters:
disableField
A boolean value. If a property field is not read only and contains data type "xs:reference", then the property field is disabled if disableField is true or enabled if disableField is false. If the field is read only or is not for data type "xs:reference" then no change is made to the field.

setFieldError(fieldName, errorMessage, errorValue)

Assigns an error to a property field.
Parameters:
fieldName
A property Id string.
errorMessage
The error message string.
errorValue
The invalid value.

setFieldFocus(fieldName)

Places focus in the property field identified by fieldName, if found. This is typically used to set the focus on a field that has an invalid value.
Parameters:
fieldName
The property Id string.

setParentFolder(parentFolder)

Sets the parent folder when this properties pane is used to add a new item.
Parameters:
parentFolder
The parent folder ecm.model.ContentItem object for the new item. When provided, the parent folder Id will be included in calls to EDS.
Since:
2.0.3.6

setPropertyValue(fieldName, value)

Sets the value for the property field identified by fieldName.
Parameters:
fieldName
The property Id string.
value
The new value for the property field.

setRepository(repository)

Assigns the repository for the common properties pane.
Parameters:
repository
A ecm.model.Repository object.

validateAll(onEditStatus, onSaveStatus)

Checks if the property fields contain valid values.
Parameters:
onEditStatus
A boolean value. If true, item properties are being modified. Only required property fields and property fields that have been modified are checked.
onSaveStatus
A boolean value. If true, changes are being saved. The first property field widget from the list of property fields with invalid values is returned.
Returns:
Returns null if all checked property fields contain valid values. Otherwise, returns the first property field widget that contains an invalid value.