Packagepotomac.ui
Classpublic class PotomacUI
InheritancePotomacUI Inheritance flash.events.EventDispatcher

PotomaUI is the main controller for the Potomac UI framework. Its primarily responsible for managing pages.



Public Methods
 MethodDefined By
  
PotomacUI(bundleSrv:IBundleService, pageFactory:PageFactory)
Callers should not construct PotomacUI.
PotomacUI
  
closePage(page:Page, promptForSave:Boolean = true):void
Closes the given page.
PotomacUI
  
dispatchEventToParts(e:Event):void
Dispatches the given event on all parts on all pages.
PotomacUI
  
findPage(id:String, input:PageInput = null):Page
Returns the page with the given id and input or null if no matching page is found.
PotomacUI
  
openPage(id:String, input:PageInput = null, options:PageOptions = null, setFocus:Boolean = true):Page
Opens an instance of the page with the given id and input.
PotomacUI
  
savePage(page:Page):void
Initiates a save on the given page.
PotomacUI
  
showPage(page:Page):void
Makes the given page visible (ex.
PotomacUI
Constructor Detail
PotomacUI()Constructor
public function PotomacUI(bundleSrv:IBundleService, pageFactory:PageFactory)

Callers should not construct PotomacUI. Its is available for injection.

Parameters
bundleSrv:IBundleService
 
pageFactory:PageFactory
Method Detail
closePage()method
public function closePage(page:Page, promptForSave:Boolean = true):void

Closes the given page. If promptForSave is true, this method runs asynchronously and may fail if either the user presses "Cancel" or a save on one of the parts fails.

Parameters

page:Page — page to save.
 
promptForSave:Boolean (default = true) — if true, the user will be prompted to save all dirty parts on the page.

dispatchEventToParts()method 
public function dispatchEventToParts(e:Event):void

Dispatches the given event on all parts on all pages.

Parameters

e:Event — event to dispatch.

findPage()method 
public function findPage(id:String, input:PageInput = null):Page

Returns the page with the given id and input or null if no matching page is found.

Parameters

id:String — id of page to find.
 
input:PageInput (default = null) — input of page to find.

Returns
Page — Page instance or null if no matching page is found.
openPage()method 
public function openPage(id:String, input:PageInput = null, options:PageOptions = null, setFocus:Boolean = true):Page

Opens an instance of the page with the given id and input.

Parameters

id:String — id of the page.
 
input:PageInput (default = null) — input for the page.
 
options:PageOptions (default = null) — page options.
 
setFocus:Boolean (default = true) — if true, the Template will show this page (ex. select its tab).

Returns
Page — the Page instance.
savePage()method 
public function savePage(page:Page):void

Initiates a save on the given page. All dirty parts will be asked to save. This method is asynchronous and may fail if the save on one of the parts fails.

Parameters

page:Page — page to save.

showPage()method 
public function showPage(page:Page):void

Makes the given page visible (ex. selects its tab).

Parameters

page:Page — page to show.