rice-framework/krad-web/src/main/webapp/krad/scripts/krad.utility.js
/**
 * Takes a string argument that contains javascript code and wraps in a function that accepts an
 * event argument.
 *
 * @param source string containing event script
 * @returns {Object} event handler function
 */
Takes a string argument that contains javascript code and wraps in a function that accepts an
event argument.

@param source string containing event script
@returns {Object} event handler function
Takes a string argument that contains javascript code and wraps in a function that accepts an event argument . @param source string containing event script @returns { Object } event handler function
function wrapAsHandler(source) {
    var script = "(function (e) { " + source + "})"
    return eval(script);
}
function wrapAsHandler ( source ) { var script = "(function (e) { " + source + "})" return eval ( script ) ; }
Takes a string argument that contains javascript code and wraps in a function that accepts an
 event argument.
Takes a string argument that contains javascript code and wraps in a function that accepts an event argument .