Packageorg.spicefactory.parsley.binding.impl
Classpublic class PropertyPublisher
InheritancePropertyPublisher Inheritance AbstractPublisher Inheritance flash.events.EventDispatcher
Implements Publisher
Subclasses SubscribingPropertyPublisher

A Publisher that observes the value of a single property and uses its value as the published value.



Public Properties
 PropertyDefined By
  currentValue : *
[read-only] The current value of this publisher.
PropertyPublisher
 Inheritedid : String
[read-only]
AbstractPublisher
  propertyWatcherType : Class
[static] The type of the property watcher implementation all PropertyPublishers should use.
PropertyPublisher
 Inheritedtype : ClassInfo
[read-only]
AbstractPublisher
 Inheritedunique : Boolean
[read-only]
AbstractPublisher
Protected Properties
 PropertyDefined By
 Inheritedenabled : Boolean = true
Indicates whether this publisher is currently enabled.
AbstractPublisher
Public Methods
 MethodDefined By
  
PropertyPublisher(target:Object, property:Property, type:ClassInfo = null, id:String = null, context:Context = null, changeEvent:String = null)
Creates a new instance.
PropertyPublisher
  
dispose():void
Disposes this publisher.
PropertyPublisher
  
init():void
Initializes this publisher.
PropertyPublisher
Protected Methods
 MethodDefined By
 Inherited
publish(newValue:*):void
Publishes a new value.
AbstractPublisher
Property Detail
currentValueproperty
currentValue:*  [read-only]

The current value of this publisher. If this value changes the publisher must dispatch a change event.


Implementation
    public function get currentValue():*
propertyWatcherTypeproperty 
propertyWatcherType:Class

The type of the property watcher implementation all PropertyPublishers should use. The specified class must implement the PropertyWatcher interface. The default implementation relies on the target dispatching change events. Parsley's Flex support will install an alternative that uses Flex Bindings instead when the application runs inside Flex.


Implementation
    public static function get propertyWatcherType():Class
    public static function set propertyWatcherType(value:Class):void
Constructor Detail
PropertyPublisher()Constructor
public function PropertyPublisher(target:Object, property:Property, type:ClassInfo = null, id:String = null, context:Context = null, changeEvent:String = null)

Creates a new instance.

Parameters
target:Object — the instance that holds the property to observe
 
property:Property — the target property that holds the published value
 
type:ClassInfo (default = null) — the type of the published value
 
id:String (default = null) — the id the value is published with
 
context:Context (default = null) — the corresponding Context in case the published object should be managed
 
changeEvent:String (default = null) — the event type that signals that the property value has changed (has no effect in Flex applications)
Method Detail
dispose()method
public function dispose():void

Disposes this publisher. After this method was invoked the publisher does not need to continue to provide a published value or dispatch change events.

init()method 
public function init():void

Initializes this publisher. The publisher is only supposed to dispatch change events and provide a published value after this method has been called until the dispose method is called.