Class fever.app.context.browser.BrowserDialog

Implemented Interfaces

IDialog

Description

Dialog management using browser context.

Some methods are Asynchronous; don't forget to define callback parameter for these methods.

Field Index

onOpenAlertDialogEVENT, onOpenConfirmDialogEVENT, onOpenMessageDialogEVENT, onShowBrowseFolderDialogEVENT, onShowFileOpenDialogEVENT, onShowFileSaveDialogEVENT

Inherited from Dialog

Method Index

new BrowserDialog()
alert(), confirm(), message(), showBrowseFolderDialog(), showFileOpenDialog(), showFileSaveDialog()

Inherited from Dialog

Constructor Detail

BrowserDialog

public function BrowserDialog()

Constructor.

Field Detail

onShowFileOpenDialogEVENT

static public onShowFileOpenDialogEVENT:EventType
Event type called to open a 'FileOpen' dialog in BrowserContext context.

onShowFileSaveDialogEVENT

static public onShowFileSaveDialogEVENT:EventType
Event type called to open a 'FileSave' dialog in BrowserContext context.

onShowBrowseFolderDialogEVENT

static public onShowBrowseFolderDialogEVENT:EventType
Event type called to open a 'BrowseFolder' dialog in BrowserContext context.

onOpenConfirmDialogEVENT

static public onOpenConfirmDialogEVENT:EventType
Event type called to open a 'confirm' dialog in BrowserContext context.

onOpenAlertDialogEVENT

static public onOpenAlertDialogEVENT:EventType
Event type called to open a 'alert' dialog in BrowserContext context.

onOpenMessageDialogEVENT

static public onOpenMessageDialogEVENT:EventType
Event type called to open a 'message' dialog in BrowserContext context.

Method Detail

showFileOpenDialog

public function showFileOpenDialog(caption:String, filterList:FileFilterCollection, multipleSelect:Boolean, handler:Delegate):String

Opens a File open chooser dialog.

If handler is undefined throws a RuntimeException exeption as this method can't be executed in synchronous mode.

As we need a complex UI to display a 'FileOpen' dialog, Fever not contain any basic implementation.
You have to associate your own command to onShowFileOpenDialogEVENT event type using the FeverController front controller.
For example, if you use the available implementation in FvAsWing framework :

 
   FeverController.getInstance().push( BrowserDialog.onShowFileOpenDialogEVENT, new FvShowFileOpenDialog() );
 

If no command is found, throws a RuntimeException exeption.

Parameters

caption( optional ) Dialog's title
multipleSelect( optional ) true to enable multiple files selections in dialog
handlerCallback to activate when result is received

Return

Nothing as this method is asynchronous in browser context.
handler must be defined to retreive selection result.

Specified By

showFileOpenDialog() in fever.app.context.abstract.IDialog

showFileSaveDialog

public function showFileSaveDialog(caption:String, filterList:FileFilterCollection, fileName:String, handler:Delegate):String

Opens a File save chooser dialog.

If handler is undefined throws a RuntimeException exeption as this method can't be executed in synchronous mode.

As we need a complex UI to display a 'FileSave' dialog, Fever not contain any basic implementation.
You have to associate your own command to onShowFileSaveDialogEVENT event type using the FeverController front controller.
For example, if you use the available implementation in FvAsWing framework :

 
   FeverController.getInstance().push( BrowserDialog.onShowFileSaveDialogEVENT, new FvShowFileSaveDialog() );
 

If no command is found, throws a RuntimeException exeption.

Parameters

caption( optional ) Dialog's title
fileName( optional ) default filename used to populate "filename" dialog's field
handlerCallback to activate when result is received

Return

Nothing as this method is asynchronous in browser context.
handler must be defined to retreive selection result.

Specified By

showFileSaveDialog() in fever.app.context.abstract.IDialog

showBrowseFolderDialog

public function showBrowseFolderDialog(caption:String, handler:Delegate):String

Opens a Browse folder dialog.

If handler is undefined throws a RuntimeException exeption as this method can't be executed in synchronous mode.

As we need a complex UI to display a 'Browse folder' dialog, Fever not contain any basic implementation.
You have to associate your own command to opens a Browse folder dialog using the FeverController front controller.
For example, if you use the available implementation in FvAsWing framework :

 
   FeverController.getInstance().push( BrowserDialog.onShowBrowseFolderDialogEVENT, new FvShowBrowseFolderDialog() );
 

If no command is found, throws a RuntimeException exeption.

Parameters

caption( optional ) Dialog's title
handlerCallback to activate when result is received

Return

Nothing as this method is asynchronous in browser context.
handler must be defined to retreive selection result.

Specified By

showBrowseFolderDialog() in fever.app.context.abstract.IDialog

confirm

public function confirm(caption:String, handler:Delegate):Boolean

Opens a confirm dialog.

If handler is undefined use the synchronous method ( js command coupling with ExternalInterface ), so result is directly return.

If handler is defined, dispatchs the onOpenConfirmDialogEVENT event throw FeverController front controller.
You must associated command with this event type to use your own confirm dialog.
For example, if you use the available implementation in FvAsWing framework :

   FeverController.getInstance().push( BrowserDialog.onOpenConfirmDialogEVENT, new FvOpenConfirmDialog() );
 

Parameters

captionDialog message

Return

true if user click on 'ok' button, otherwise false ( in synchronous mode of course )

Specified By

confirm() in fever.app.context.abstract.IDialog

alert

public function alert(caption:String, handler:Delegate):Void

Opens a alert dialog.

If a command is associated to onOpenAlertDialogEVENT event type in FeverController front controller, command is executed.
Either use the basic synchronous method ( 'alert' javascript method coupled with ExternalInterface ).
For example, if you use the available implementation in FvAsWing framework :

   FeverController.getInstance().push( BrowserDialog.onOpenAlertDialogEVENT, new FvOpenAlertDialog() );
 

Parameters

captionDialog message

Specified By

alert() in fever.app.context.abstract.IDialog

message

public function message(caption:String, handler:Delegate):Void

Opens a alert dialog.

If a command is associated to onOpenMessageDialogEVENT event type in FeverController front controller, command is executed.
Either use the basic synchronous method ( 'alert' javascript method coupled with ExternalInterface ).
For example, if you use the available implementation in FvAsWing framework :

   FeverController.getInstance().push( BrowserDialog.onOpenMessageDialogEVENT, new FvOpenMessageDialog() );
 

Parameters

captionDialog message

Specified By

message() in fever.app.context.abstract.IDialog