Namespace NaosHandler
This class enables you to register callback handler to deal with
certain events. Currently the following types are provided:
Custom Operation Handler: Allows you to handle
calls from the PHP side of the Naos Framework.
View Update Notifier: Whenever a view gets updated
these handlers will be calles afterwards.
Document OnLoad Notifier: These registered handlers
get called when the DOM tree of the HTML document is loaded fully
(notice: images and other media might still be in the process of
loading).
Defined in: handler.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
This class enables you to register callback handler to deal with
certain events.
|
| Field Attributes | Field Name and Description |
|---|---|
| <private> <static> |
NaosHandler._customOperationHandler
Contains all registered Custom Operation Handler callback methods.
|
| <private> <static> |
NaosHandler._documentOnLoadNotifier
Contains all registered Document OnLoad Notifier callback methods.
|
| <private> <static> |
NaosHandler._viewUpdateNotifier
Contains all registered View Update Notifier callback methods.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
NaosHandler.customOperation(module, type, data)
Triggers all registered Custom Operation Handler callback methods for
a module and type.
|
| <static> |
NaosHandler.documentOnLoadNotifier()
Triggers all registered Document OnLoad Notifier callback methods.
|
| <static> |
NaosHandler.registerCustomOperationHandler(module, type, callback)
Registers a new Custom Operation Handler callback method for a module and type combination.
|
| <static> |
NaosHandler.registerDocumentOnLoadNotifier(callback)
Registers a new Document OnLoad Notifier callback method.
|
| <static> |
NaosHandler.registerViewUpdateNotifier(view, callback)
Registers a new View Update Notifier callback method for a view.
|
| <static> |
NaosHandler.viewUpdateNotifier(view, output)
Triggers all registered View Update Notifier callback methods for a view.
|
Namespace Detail
NaosHandler
This class enables you to register callback handler to deal with
certain events. Currently the following types are provided:
Custom Operation Handler: Allows you to handle calls from the PHP side of the Naos Framework.
View Update Notifier: Whenever a view gets updated these handlers will be calles afterwards. Document OnLoad Notifier: These registered handlers get called when the DOM tree of the HTML document is loaded fully (notice: images and other media might still be in the process of loading).
Custom Operation Handler: Allows you to handle calls from the PHP side of the Naos Framework.
View Update Notifier: Whenever a view gets updated these handlers will be calles afterwards. Document OnLoad Notifier: These registered handlers get called when the DOM tree of the HTML document is loaded fully (notice: images and other media might still be in the process of loading).
Field Detail
<private> <static>
{Array}
NaosHandler._customOperationHandler
Contains all registered Custom Operation Handler callback methods.
<private> <static>
{Array}
NaosHandler._documentOnLoadNotifier
Contains all registered Document OnLoad Notifier callback methods.
<private> <static>
{Array}
NaosHandler._viewUpdateNotifier
Contains all registered View Update Notifier callback methods.
Method Detail
<static>
NaosHandler.customOperation(module, type, data)
Triggers all registered Custom Operation Handler callback methods for
a module and type.
- Parameters:
- {String} module
- Assigned module.
- {String} type
- Type of Custom Operation Handler, actually this is the identifier on module level.
- {String|Object|Array} data
- Data which is provided to the callback methods.
<static>
NaosHandler.documentOnLoadNotifier()
Triggers all registered Document OnLoad Notifier callback methods.
<static>
NaosHandler.registerCustomOperationHandler(module, type, callback)
Registers a new Custom Operation Handler callback method for a module and type combination.
Use this function in your application to make use of this feature.
- Parameters:
- {String} module
- Assigned module.
- {String} type
- Type of Custom Operation Handler, actually this is the identifier on module level.
- {function} callback
- Pointer to the callback method.
<static>
NaosHandler.registerDocumentOnLoadNotifier(callback)
Registers a new Document OnLoad Notifier callback method.
Use this function in your application to make use of this feature.
- Parameters:
- {function} callback
- Pointer to the callback method.
<static>
NaosHandler.registerViewUpdateNotifier(view, callback)
Registers a new View Update Notifier callback method for a view.
Use this function in your application to make use of this feature.
- Parameters:
- {String} view
- The view which gets updated.
- {String} callback
- Pointer to the callback method.
<static>
NaosHandler.viewUpdateNotifier(view, output)
Triggers all registered View Update Notifier callback methods for a view.
- Parameters:
- {String} view
- The view which gets updated.
- {String} output
- The new HTML output of the view.