Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
com.adobe.fiber.valueobjects 
IModelInstance 
Packagecom.adobe.fiber.valueobjects
Interfacepublic interface IModelInstance
Implementors AbstractEntityMetadata

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The IModelInstance interface declares functions that expose metadata information that depends on the instance state of value objects generated by Adobe application modeling technology.

An implementation of this interface is generated for each entity declared in a model. An instance corresponding to a value object is accessible by its _model property.



Public Properties
 PropertyDefined By
  invalidConstraints : Array
[read-only] Returns an array of currently invalid constraints or an empty array if the value object is currently valid.
IModelInstance
  validationFailureMessages : Array
[read-only] Returns an array of localized error messages corresponding to the current set of failed constraints and validations of the value object.
IModelInstance
Public Methods
 MethodDefined By
  
Returns the names of all available properties of this instance as determined by variants.
IModelInstance
  
Returns an array of currently invalid constraints whose values may change as a result of propertyName changing.
IModelInstance
  
Returns a map of identity property names to their current values.
IModelInstance
  
Returns an array of localized error messages corresponding to the current set of failed validations for the given property.
IModelInstance
  
getStyle(propertyName:String):IStyle
Returns style object for property.
IModelInstance
  
getValue(propertyName:String):*
Gets the value of a property
IModelInstance
  
isAvailable(propertyName:String):Boolean
Determines if a property is available as is determined by variants.
IModelInstance
  
setValue(propertyName:String, value:*):void
Sets the value of a property.
IModelInstance
Property Detail

invalidConstraints

property
invalidConstraints:Array  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns an array of currently invalid constraints or an empty array if the value object is currently valid.



Implementation
    public function get invalidConstraints():Array

validationFailureMessages

property 
validationFailureMessages:Array  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns an array of localized error messages corresponding to the current set of failed constraints and validations of the value object. Returns an empty array if the value object is currently valid.



Implementation
    public function get validationFailureMessages():Array
Method Detail

getAvailableProperties

()method
public function getAvailableProperties():IPropertyIterator

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the names of all available properties of this instance as determined by variants.

Returns
IPropertyIterator — Names of all available properties of this instance as determined by variants.

getDependantInvalidConstraints

()method 
public function getDependantInvalidConstraints(propertyName:String):Array

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns an array of currently invalid constraints whose values may change as a result of propertyName changing. If there are no such properties, an empty array is returned.

Parameters

propertyName:String — Name of property for which an array of dependant invalid constraints is retrieved

Returns
Array — Array of currently invalid constraints whose values may change as a result of propertyName changing. If there are no such properties, an empty array is returned.

getIdentityMap

()method 
public function getIdentityMap():Object

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns a map of identity property names to their current values.

Returns
Object — Map of identity property names to their current values

getPropertyValidationFailureMessages

()method 
public function getPropertyValidationFailureMessages(propertyName:String):Array

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns an array of localized error messages corresponding to the current set of failed validations for the given property. Returns an empty array if the property currently has no failing validations.

Parameters

propertyName:String — Name of property of interest

Returns
Array — Array of localized error messages corresponding to the current set of failed validations for the given property. Returns an empty array if the property currently has no failing validations.

getStyle

()method 
public function getStyle(propertyName:String):IStyle

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns style object for property.

Parameters

propertyName:String — Name of property for which associated style is retrieved

Returns
IStyle — Style object for property

getValue

()method 
public function getValue(propertyName:String):*

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Gets the value of a property

Parameters

propertyName:String — Desired property

Returns
* — Current value of propertyName for this instance

isAvailable

()method 
public function isAvailable(propertyName:String):Boolean

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Determines if a property is available as is determined by variants. An error is thrown if the property name that is passed in is not a valid property of the value object. To add bindings to the availability flag for a particular property, use the ispropertyNameAvailable() function. This function exists for every property and supports binding.

Parameters

propertyName:String — Property to check for availability

Returns
Boolean — true if this property is currently available as is determined by variants

Throws
Error — if the passed in property name is not a valid property of the value object.

setValue

()method 
public function setValue(propertyName:String, value:*):void

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Sets the value of a property. To clear a value, set it to undefined.

Parameters

propertyName:String — Property to set
 
value:* — Value to set property to