Packagesoi.screens.sections.models
Classpublic class ContentsModel

The ContentsModel class is the data model of the currently loaded contents xml file. This class provides a collection property for binding to user interface components to enable dynamic modification of the contents xml. This class also provides a toString method to return the current state of the contents xml in a format ready to be written to file.



Public Properties
 PropertyDefined by
  contentsCol : XMLListCollection
XMLListCollection of the contentsXML property.
ContentsModel
  contentsXML : XML
This property contains the currently loaded contents.xml file as XML.
ContentsModel
Public Methods
 MethodDefined by
  
Constructor.
ContentsModel
  
setNewItem():void
Adds a new item to the end of the contentsCol property.
ContentsModel
  
toString():String
Returns the contentsXML property with XML header metadata to be written to the contents.xml file.
ContentsModel
Property detail
contentsColproperty
public var contentsCol:XMLListCollection

XMLListCollection of the contentsXML property. Changes to the contentsXML property are made through this collection. This property is used as the dataProvider for the contents dataGrid, and current content item textInputs in the ManageContents section of the application. This property is not set directly - but rather automatically when the contentsXML is set.

The default value is null.

contentsXMLproperty 
contentsXML:XML  [read-write]

This property contains the currently loaded contents.xml file as XML. It is not edited directly, but receives updates through changes to the contentsCol property. Setting this property will automatically set the contentsCol property.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get contentsXML():XML
    public function set contentsXML(value:XML):void
Constructor detail
ContentsModel()constructor
public function ContentsModel()

Constructor. The constructor automatically instantiates the contentsCol property.

Method detail
setNewItem()method
public function setNewItem():void

Adds a new item to the end of the contentsCol property.

toString()method 
public function toString():String

Returns the contentsXML property with XML header metadata to be written to the contents.xml file.

Returns
String — A string representation of the contentsXML property with XML header metadata.