Packagecom.vmware.tiwo
Classpublic class TiwoFeatures
InheritanceTiwoFeatures Inheritance Object

An enumeration of features that can be added/removed when registering items such as wizards with the Tiwo manager which controls the "Work In Progress" list.

Note: Tiwo = Things I am Working On.



Public Properties
 PropertyDefined By
  features : Array
Current features being used.
TiwoFeatures
Public Methods
 MethodDefined By
  
addFeature(feature:String):void
Add a feature to the list of features being used.
TiwoFeatures
  
removeFeature(feature:String):void
Remove a feature from the list of features being used.
TiwoFeatures
Public Constants
 ConstantDefined By
  HELP : String = help
[static] Help feature.
TiwoFeatures
  PERSISTENCE : String = persistence
[static] Persistence feature.
TiwoFeatures
Property Detail
featuresproperty
public var features:Array

Current features being used.

Method Detail
addFeature()method
public function addFeature(feature:String):void

Add a feature to the list of features being used.

Parameters

feature:String — The feature name.

removeFeature()method 
public function removeFeature(feature:String):void

Remove a feature from the list of features being used.

Parameters

feature:String — The feature name.

Constant Detail
HELPConstant
public static const HELP:String = help

Help feature.

This feature is added by default to Tiwo registered items. It adds a help button (a "?" icon) on the right-hand side of the container frame. Pressing this button sends a DialogEvent.HELP event to all children of the container. You should register an event listener to provide the relevant help information.

Here is how to remove the help feature when registering a wizard:
       ...
       var tiwoEvent:TiwoRegistrationRequestEvent =
              new TiwoRegistrationRequestEvent(icon, title, wizard);
       tiwoEvent.features.removeFeature(TiwoFeatures.HELP);
       dispatchEvent(tiwoEvent);
    

PERSISTENCEConstant 
public static const PERSISTENCE:String = persistence

Persistence feature.

By default a Tiwo item like a wizard is available only during the current session (the object data is kept in memory). When using persistence the item remains available in the "Work In Progress" list after the user logs out and logs in again later, even if the application is restarted in between. The object's data is saved automatically every 5 minutes or when the item is minimized in "Work In Progress".

Here is how to add the persistence feature when registering a wizard:
       ...
       var tiwoEvent:TiwoRegistrationRequestEvent =
           new TiwoRegistrationRequestEvent(icon, title, wizard);
       tiwoEvent.features.addFeature(TiwoFeatures.PERSISTENCE);
       dispatchEvent(tiwoEvent);
    

The wizard code must also have a [Persistable] tag on all the properties that need to be persisted, only those properties will get their value restored. The rule of thumb is to mark your core data model as [Persistable], so that each wizard page can get its data restored and validated as if the user had entered it again. Normally the wizard will be restored exactly where the user left it, ready to complete. But since there is no guarantee that "old data" is still valid, some pages may be partially restored, it is up to you to add more logic to deal with those cases.

Persistance is performed with the help of the platform's internal UiSerializer and MxmlSerializer. You can persist properties of any primitive types, and also custom types as long as they have a constructor without parameters to instantiate the object. Visual objects cannot be serialized.

If you have multiple [Persistable] properties in the same view or mediator there is no guarantee in which order they will be restored.