Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.

Methods of the helma.Aspects module.

To use this optional module, its repository needs to be added to the application, for example by calling app.addRepository('modules/helma/Aspects.js')
helma Aspects()
Library for adding Aspects

Provides static methods to wrap existing functions inside a javascript closure in order to add additional behavior without overriding the existing one.

Based on code by roman porotnikov, http://www.jroller.com/page/deep/20030701

Note: Each prototype that uses aspects must implement a method onCodeUpdate() to prevent aspects being lost when the prototype is re-compiled
methods
Methods
helma.Aspects. addBefore(obj, fname, before)
Adds a function to be called before the orginal function.

The return value of the added function needs to provide the array of arguments that is passed to the original function. The added function receives an array of the original arguments, the original function and the scope object of the original function as its parameters.
parameters
Object obj The object of which the original function is a property
String fname The property name of the original function
Function before The function to be called before the original function
returns
Function A new function, wrapping the original function
helma.Aspects. addAfter(obj, fname, after)
Adds a function to be called after an existing function.

The return value of the original function is passed to the added function as its first argument. In addition, the added function also receives an array of the original arguments, the original function and the scope object of the original function as additional parameters.
parameters
Object obj as Object, the object of which the original function is a property
String fname as String, the property name of the original function
Function after as Function, the function to be called after the original function
returns
Function A new function, wrapping the original function
helma.Aspects. addAround(obj, fname, around)
Wraps an additional function around the original function.

The added function receives as its arguments an array of the original arguments, the original function and the scope object of the original function. The original function is not called directly and needs to be invoked by the added function.
parameters
Object obj as Object, the object of which the original function is a property
String fname as String, the property name of the original function
Function around as Function, the function to be called inside the original function
returns
Function A new function, wrapping the original function
Fri, 05 Feb 2010 17:40:05 GMT.

core framework

optional modules

java libraries

properties files