Class ecm.widget.PropertyEditors
Holds form fields in a private array variable.
Defined in: <ecm\widget\PropertyEditors.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Method Attributes | Method Name and Description |
---|---|
addToInvalidFields(field)
Adds the input field to the list of invalid fields.
|
|
appendField(field)
Appends a new field to the array of fields.
|
|
destroyField(field)
Removes and destroys the field.
|
|
Removes and destroys all of the fields.
|
|
getEditableFieldWithName(fieldName)
Retrieves an editable field by field name.
|
|
Returns the fields.
|
|
getFieldWithEitherName(fieldNames)
Returns the first field that is found for one of the field name strings passed in an array of field name
strings.
|
|
getFieldWithName(fieldName)
Retrieves a field by name.
|
|
Returns the first invalid field from the list of invalid fields.
|
|
Returns the field name string for the first text property field.
|
|
Returns the field name string of the field that has focus.
|
|
Retrieves a map of invalid field property names.
|
|
getPropertiesJSON(includeReadonly, excludeEmptyValues)
This method is used to obtain appropriate object structure for JSON serializing on add and edit properties
requests.
|
|
getPropertyValue(fieldName)
Retrieves the value for a field by field name.
|
|
removeFromInvalidFields(field)
Removes the input field from the list of invalid fields.
|
|
setPropertyDisplayedValue(fieldName, value)
Sets the displayed value for a field by field name.
|
|
setPropertyValue(fieldName, value)
Sets the value for a field by field name.
|
|
validate()
Validates all of the fields.
|
|
Validates the modified fields.
|
|
validateField(field)
|
|
validateFieldsUsingPropertyIdMap(propertyIdMap)
Looks up each field property name in the passed in map.
|
|
Calls validate on all required fields that are empty.
|
Method Detail
addToInvalidFields(field)
Adds the input field to the list of invalid fields.
- Parameters:
- field
- A field that will be added to the invalid field list.
appendField(field)
Appends a new field to the array of fields. This is used to add custom fields that are not created here.
- Parameters:
- field
- A field to add to the array of fields.
constructor()
destroyField(field)
Removes and destroys the field.
- Parameters:
- field
- Since:
- 2.0.3
destroyFields()
Removes and destroys all of the fields.
getEditableFieldWithName(fieldName)
Retrieves an editable field by field name.
- Parameters:
- fieldName
- The field name string.
- Returns:
- A field. If no editable field is found by field name then
null
is returned.
getFields()
Returns the fields.
- Returns:
- An array containing the property editor fields.
getFieldWithEitherName(fieldNames)
Returns the first field that is found for one of the field name strings passed in an array of field name
strings. This is intended for retrieving a field that may have a different name in certain circumstances,
such as the document title field which may have a different name for different repository types.
- Parameters:
- fieldNames
- An array of field name strings. Each name is used in array order to find a field. The first field that is found is returned.
- Returns:
- A field. If no field is found for any of the field name strings then
null
is returned.
getFieldWithName(fieldName)
Retrieves a field by name.
- Parameters:
- fieldName
- The field name string.
- Returns:
- A field. If no field is found,
null
is returned.
getFirstInvalidField()
Returns the first invalid field from the list of invalid fields.
- Returns:
- The first invalid field. If there are no invalid fields then
null
is returned.
getFirstTextPropertyName()
Returns the field name string for the first text property field.
- Returns:
- A field name string. If no text property field is found then
null
is returned.
getFocusedFieldName()
Returns the field name string of the field that has focus.
- Returns:
- A field name string. If no field is found with focus then
null
is returned.
getInvalidFieldsPropertyIdMap()
Retrieves a map of invalid field property names.
- Since:
- 2.0.2
- Returns:
- A map of invalid field property names.
getPropertiesJSON(includeReadonly, excludeEmptyValues)
This method is used to obtain appropriate object structure for JSON serializing on add and edit properties
requests. It should only be used in this way, and no other use of the object structure from this method
should be performed as this structure could change.
- Parameters:
- includeReadonly
- A boolean value. If
true
, values for read only properties are included. Otherwise read only property values are excluded from the JSON. - 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 a field by field name.
- Parameters:
- fieldName
- The name of the field.
- Returns:
- The field value. If the field is not found then
null
is returned. The actual field value might also be null.
removeFromInvalidFields(field)
Removes the input field from the list of invalid fields.
- Parameters:
- field
- A field that will be removed from the invalid field list.
{Boolean} setPropertyDisplayedValue(fieldName, value)
Sets the displayed value for a field by field name.
- Parameters:
- fieldName
- The name of the field to assign the displayed value.
- value
- The displayed value to assign to the field identified by the
fieldName
parameter.
- Returns:
- {Boolean} A value of
true
if the field was found, otherwisefalse
is returned.
{Boolean} setPropertyValue(fieldName, value)
Sets the value for a field by field name.
- Parameters:
- fieldName
- The name of the field to assign the value.
- value
- The value to assign to the field identified by
fieldName
.
- Returns:
- {Boolean} A value of
true
if the field was found, otherwisefalse
is returned.
validate()
Validates all of the fields.
- Returns:
- Returns null if all of the fields contain valid values. Otherwise, returns the first field that contains an invalid value.
validateChangedField()
Validates the modified fields.
- Returns:
- Returns
null
if all the modified fields contain valid values. Otherwise, returns the first modified field that contains an invalid value.
validateField(field)
- Parameters:
- field
- Since:
- 2.0.2
- Returns:
- True if this field is valid, else if it is not valid false is returned.
validateFieldsUsingPropertyIdMap(propertyIdMap)
Looks up each field property name in the passed in map. If the property name entry maps to true, the field is
validated.
- Parameters:
- propertyIdMap
- Since:
- 2.0.2
validateRequiredFields()
Calls validate on all required fields that are empty.
- Since:
- 2.0.2
- Returns:
- Returns
null
if no required fields contain empty values. Otherwise, returns the first required field that contains an empty value.