Packagevegas.models
Classpublic class PageByPageModel
InheritancePageByPageModel Inheritance CoreModel Inheritance CoreEventDispatcher Inheritance Object

The page navigator model.



Public Properties
 PropertyDefined By
 Inheritedchannel : String
[read-only] Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
  currentPage : uint
Returns the current page number.
PageByPageModel
 Inheritedid : *
Returns the id of this IModelObject.
CoreModel
  limitPage : uint
Indicates the limit until the current pages.
PageByPageModel
  pages : Array
[read-only] Indicates the array representation of all page numbers with the current navigator values.
PageByPageModel
  totalPage : uint
Indicates the pages total number.
PageByPageModel
Public Methods
 MethodDefined By
  
PageByPageModel(current:uint = 1, total:uint = 1, limit:uint = 5, global:Boolean = false, channel:String = null, id:* = null)
Creates a new PageByPageModel instance.
PageByPageModel
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
CoreEventDispatcher
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the internal system.events.EventDispatcher reference.
CoreEventDispatcher
  
Returns the event name use in the run method.
PageByPageModel
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
isGlobal():Boolean
Indicates if the dispatcher use a global event flow.
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
  
notifyChange(value:Array):void
Notify a ArrayEvent when a Array pages change in the model.
PageByPageModel
 Inherited
registerEventListener(type:String, listener:*, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
  
run(... args):void
[override] Run the first process with this model.
PageByPageModel
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global system.events.EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
  
setNavigator(current:uint = 1, total:uint = 1, limit:uint = 5):void
Sets the navigator attributes and run the model.
PageByPageModel
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 Inherited
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
CoreEventDispatcher
Protected Methods
 MethodDefined By
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
Property Detail
currentPageproperty
currentPage:uint

Returns the current page number.


Implementation
    public function get currentPage():uint
    public function set currentPage(value:uint):void
limitPageproperty 
limitPage:uint

Indicates the limit until the current pages.


Implementation
    public function get limitPage():uint
    public function set limitPage(value:uint):void
pagesproperty 
pages:Array  [read-only]

Indicates the array representation of all page numbers with the current navigator values.


Implementation
    public function get pages():Array
totalPageproperty 
totalPage:uint

Indicates the pages total number.


Implementation
    public function get totalPage():uint
    public function set totalPage(value:uint):void
Constructor Detail
PageByPageModel()Constructor
public function PageByPageModel(current:uint = 1, total:uint = 1, limit:uint = 5, global:Boolean = false, channel:String = null, id:* = null)

Creates a new PageByPageModel instance.

Parameters
current:uint (default = 1) — the current page of the model.
 
total:uint (default = 1) — the total number of the model.
 
limit:uint (default = 5) — the limit number of pages of the model.
 
global:Boolean (default = false) — the flag to use a global event flow or a local event flow.
 
channel:String (default = null) — the name of the global event flow if the global argument is true.
 
id:* (default = null) — the id of the model.
Method Detail
getEventTypeCHANGE()method
public function getEventTypeCHANGE():String

Returns the event name use in the run method.

Returns
String — the event name use in the run method.
notifyChange()method 
public function notifyChange(value:Array):void

Notify a ArrayEvent when a Array pages change in the model.

Parameters

value:Array

run()method 
override public function run(... args):void

Run the first process with this model.

Parameters

... args

setNavigator()method 
public function setNavigator(current:uint = 1, total:uint = 1, limit:uint = 5):void

Sets the navigator attributes and run the model.

Parameters

current:uint (default = 1)
 
total:uint (default = 1)
 
limit:uint (default = 5)