Class icm.model.PropertyEditable
Extends
ecm.model._ModelObject.
Represents a Property when editing an object such as a case or work item.
Defined in: <icm/model/PropertyEditable.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
icm.model.PropertyEditable(properties)
Constructs a PropertyEditable object.
|
Field Summary
Field Attributes | Field Name and Description |
---|---|
Holds an array of ecm.model.ContentItem objects that represents the items in
this attachment field.
|
|
The cardinality
|
|
The choice list
|
|
The indexes of items in a multi-value list that are invalid if supplied
by an external system.
|
|
A custom validation error if one is supplied by an external system.
|
|
The data type
|
|
The default value
|
|
Specifies that the value has been set and this property has dependent properties.
|
|
The textual description
|
|
Indicates if the value has been modified.
|
|
The display mode.
|
|
Indicates if an empty string can be used wherever null is accepted and otherwise could not be accepted.
|
|
Indicates what settings of this property object have been modified by an external data service, if any.
|
|
Indicates if this property has dependent properties.
|
|
Indicates if this property should be hidden in a UI.
|
|
Indicates if this property is inherited from a super-class
|
|
The maximum length
|
|
The maximum value
|
|
The minimum length
|
|
The minimum value
|
|
Indicates if this property can be used to order the results of a query.
|
|
The original value before any modifications to the value.
|
|
If property represents a step parameter, this is the parameter name as
opposed to the authored name.
|
|
Indicates the provider for this property
|
|
Indicates if this property is read-only
|
|
The ecm.model.Repository object that stores the object that contains this property.
|
|
Indicates if this property requires a value
|
|
The settability
|
|
Indicates the symbolicName for this property
|
|
Indicates if this property is controlled by the system.
|
|
The value of the property
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
addAttachment(contentItem)
Adds an item to this attachment field.
|
|
onChoiceListChanged(choiceList, propEditable)
Called whenever the choice list changes.
|
|
onCustomValidationChanged(customValidationError, customInvalidItems, propEditable)
Called whenever the custom validation error or custom invalid items changes.
|
|
onDisplayModeChanged(displayMode, propEditable)
Called whenever the display mode changes.
|
|
onHasDependentPropertiesChanged(hasDependentProperties, propEditable)
Called whenever the hasDependentProperties setting changes.
|
|
onHiddenChanged(hidden, propEditable)
Called whenever the hidden setting changes.
|
|
onMaxLengthChanged(maxLength, propEditable)
Called whenever the maximum length changes.
|
|
onMaxValueChanged(maxValue, propEditable)
Called whenever the maximum value changes.
|
|
onMinValueChanged(minValue, propEditable)
Called whenever the minimum value changes.
|
|
onReadOnlyChanged(readOnly, propEditable)
Called whenever the read only setting changes.
|
|
onRequiredChanged(required, propEditable)
Called whenever the required setting changes.
|
|
onValueChanged(value, propEditable)
Called whenever the value is modified.
|
|
removeAttachment(contentItem)
Removes an item from this attachment field.
|
|
retrieveAttachmentContents(callback)
Retrieves a list of ecm.model.ContentItem objects corresponding to the items in
this attachment field.
|
|
setAttachments(contentItems)
Sets the attachments as an array of ContentItem objects.
|
|
setValue(val)
Call this setter method to set the value instead of setting the value
property directly.
|
Constructor Detail
icm.model.PropertyEditable(properties)
- Parameters:
- properties
- The properties for the PropertyEditable object. The properties can be any of the public fields as defined below and on ecm.model._ModelObject.
Field Detail
attachmentContents
cardinality
choiceList
customInvalidItems
customValidationError
dataType
defaultValue
dependentsRetrievalPending
description
dirty
displayMode
emptyStringSameAsNull
externalDataModifications
- displayMode
- readOnly
- choiceList
- required
- hidden
- maxValue
- minValue
- maxLength
- value
- customValidation
- hasDependentProperties
hasDependentProperties
hidden
inherited
maxLength
maxValue
minLength
minValue
orderable
originalValue
parameterName
provider
readOnly
repository
required
settability
symbolicName
system
value
Method Detail
addAttachment(contentItem)
If this property represents a single-value attachment field, the single value is replaced by the ContentItem object. The value of the field is updated with a single javascript object and the attachmentContents property is replaced with a 1-item array containing the ContentItem.
This method requires that the retrieveAttachmentContents() method was called previously. No action is taken if that method has not yet been called.
This method takes no action if this property does not represent an attachment field.
- Parameters:
- contentItem
- An ecm.model.ContentItem object that represents the document that is to be added to this attachment field. Use the IBM Content Navigator API to retrieve the ContentItem object by running a query or creating a new document.
onChoiceListChanged(choiceList, propEditable)
- Parameters:
- choiceList
- The new choiceList value.
- propEditable
- This PropertyEditable object.
onCustomValidationChanged(customValidationError, customInvalidItems, propEditable)
- Parameters:
- customValidationError
- The new value of the customValidationError setting.
- customInvalidItems
- The new value of the customInvalidItems setting.
- propEditable
- This PropertyEditable object.
onDisplayModeChanged(displayMode, propEditable)
- Parameters:
- displayMode
- The new value of the displayMode setting.
- propEditable
- This PropertyEditable object.
onHasDependentPropertiesChanged(hasDependentProperties, propEditable)
- Parameters:
- hasDependentProperties
- The new value of the hasDependentProperties setting.
- propEditable
- This PropertyEditable object.
onHiddenChanged(hidden, propEditable)
- Parameters:
- hidden
- The new hidden value.
- propEditable
- This PropertyEditable object.
onMaxLengthChanged(maxLength, propEditable)
- Parameters:
- maxLength
- The new maxLength value.
- propEditable
- This PropertyEditable object.
onMaxValueChanged(maxValue, propEditable)
- Parameters:
- maxValue
- The new maxValue value.
- propEditable
- This PropertyEditable object.
onMinValueChanged(minValue, propEditable)
- Parameters:
- minValue
- The new minValue value.
- propEditable
- This PropertyEditable object.
onReadOnlyChanged(readOnly, propEditable)
- Parameters:
- readOnly
- The new value of the readOnly setting.
- propEditable
- This PropertyEditable object.
onRequiredChanged(required, propEditable)
- Parameters:
- required
- The new required value.
- propEditable
- This PropertyEditable object.
onValueChanged(value, propEditable)
- Parameters:
- value
- The new value
- propEditable
- This PropertyEditable instance
removeAttachment(contentItem)
If this property represents a single-value attachment field and the supplied ContentItem object represents that single value, then the value of the property will be replaced with an empty javascript object and the attachmentContents property will be replaced with a zero-length array.
This method requires that the retrieveAttachmentContents() method was called previously. No action is taken if that method has not yet been called.
This method takes no action if this property does not represent an attachment field.
- Parameters:
- contentItem
- An ecm.model.ContentItem object that represents the document that is to be removed from this attachment field. Use the IBM Content Navigator API to retrieve the ContentItem object by running a query.
retrieveAttachmentContents(callback)
The attachmentContents property will always be filled with an array of ContentItem objects. For a single-value field, the attachmentContents property is filled with a 1-item array if the field has a value, otherwise it will contain a 0-length array.
Each ContentItem object obtained will have a property unretrievedAttachmentStatus
that indicates a retrieval status if that item was not retrieved from a repository.
Some ContentItem objects may not be retrieved
and may only contain minimal information taken from the attachment. Currently the
ContentItem is not retrieved if the attachment references a document stored in an external
repository.
The callback function will be called with a null argument if this property does not represent an attachment field.
- Parameters:
- callback
- Function that is passed an array of ecm.model.ContentItem objects as an argument.
setAttachments(contentItems)
For a single-value attachment field, a 1-item array can be passed in to set the single attachment value and a zero-length array can be passed in to clear the attachment value. The value of a single-value attachment field has an empty javascript object if it is not set. The attachmentContents property still holds an array for a single-value attachment field and will be either a 1-item or zero-length array.
For convenience, a single ContentItem object or null can be passed to this method. This can be more convenient when dealing with single-value attachment fields. A single ContentItem object is equivalent to passing in a 1-item array and null is equivalent to passing in a zero-length array. Note that the attachmentContents property will still hold an array even if this object represents a single-value field.
This method takes no action if this property does not represent an attachment field.
- Parameters:
- contentItems
- An array of ecm.model.ContentItem objects that represents the documents that are to be set as the attachments. Use the IBM Content Navigator API to retrieve the ContentItem objects by running a query or creating new documents.
setValue(val)
- Parameters:
- val
- The new property value.