Class Config
Object
|
+--Listener
|
+--ModelBase
|
+--Config
- class
Config
- extends ModelBase
Author: adair
Defined in Config.js
Requires:
Field Summary |
Object |
defaultLang
multilingual support; defaults to english
Set via a "language" parameter in the URL,
or by setting a global "language" Javascript variable in the page . |
Object |
doc
open the application specific configuration document, passed in aas the url argument. |
Object |
lang
|
Object |
namespace
|
Object |
objects
the objects property holds a reference to every mapbuilder javascript object
created. |
Object |
skinDir
|
Object |
url
|
Object |
widgetText
|
Constructor Summary |
Config
(url)
The config object is the parent model of all mapbuilder objects.
|
Method Summary |
void
|
loadModel( modelId, modelUrl )
Load a model and its child models, widgets and tools.
|
void
|
paintWidget( widget )
Repaint the widget passed in.
|
Methods inherited from class ModelBase |
getXpathValue, setXpathValue, loadModelDoc, setModel, finishLoading, newRequest, deleteTemplates, saveModel, createObject, loadObjects, parseConfig, refresh, init, clearModel
|
defaultLang
Object defaultLang
multilingual support; defaults to english
Set via a "language" parameter in the URL,
or by setting a global "language" Javascript variable in the page .
Retrieve the language value from the global conifg object as "config.lang"
doc
Object doc
open the application specific configuration document, passed in aas the url argument.
lang
Object lang
namespace
Object namespace
objects
Object objects
the objects property holds a reference to every mapbuilder javascript object
created. Each object is added as a property of config.objects using the
value of the object id from the configuration file
skinDir
Object skinDir
url
Object url
widgetText
Object widgetText
Config
Config(url)
The config object is the parent model of all mapbuilder objects.
The application creates a global object called 'config' which represents
the mapbuilder configuration xml file passed in as a parameter.
Config is a model like any other model.
Any mapbuilder object can be de-referenced by using the 'config.objects'
property as in config.objects.idValueFromConfig.
The schema for the config can be found at /mabuilder/lib/schemas/config.xsd
Parameters:
url
- URL of the configuration file.
loadModel
void loadModel( modelId, modelUrl )
Load a model and its child models, widgets and tools.
This function can be called at any time to load a new model or replace an
existing model object.
Parameters:
modelId
- the id of the model in config XML to be updated
modelUrl
- URL of the XML model document to be loaded
paintWidget
void paintWidget( widget )
Repaint the widget passed in.
This function can be called at any time to paint the widget.
Parameters:
widget
- a pointer to the widget object to be painted.
Documentation generated by
JSDoc on Tue Aug 21 08:12:28 2007