20.3.1Class Generator

AJAX Library generator.

Class Generator( baseUri, basePath, functions )
baseUri The URI where the AJAX functions can be found.
basePath Path where the function modules should be searched.
functions List of function names to be loaded.

This class generates a javascript library to be used in pair with ajax functions.

It is means to be instantiated in a fal script that is then loaded as a javascript source from a remote HTTP client

It reads the specified functions from their own .fal file and creates prototype calls for javascript.

An example library script that we may call library_js.fal may look like:


   import Generator from web.ajax.library as Generator

   Generator( "http://api.server.com/path", "./", .[
         "MakeThis"
         "MakeThat"
         "MakeThatToo"]
   ).generate()

The generator will generate javascript functions like:


      Falcon.<FunctionName>( onSuccess, onError, onFailure ).call( param1, param2 ... paramN );

where:

The parameters of the call() method of the returned object are in the same order as specified for the API. They will be added as = to the query string if not null.

Properties
basePath
baseUri
functions
Methods
generate
makeFunc

Properties

basePath

baseUri

functions

Methods

generate

generate()

makeFunc

makeFunc( funcName )
Made with http://www.falconpl.org