rice-framework/krad-web/src/main/webapp/krad/scripts/krad.utility.js
/**
 * window[functionName](values, extraData) doesn't support JavaScript namespaced function.  This convenience function
 * allows the usage of namespaced functions.
 *
 * http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string/
 *
 * @param functgionName name of the function to be called
 * @param context context in which to find the functon
 */
window[functionName](values, extraData) doesn't support JavaScript namespaced function.  This convenience function
allows the usage of namespaced functions.



@param functgionName name of the function to be called
@param context context in which to find the functon
window [ functionName ] ( values extraData ) doesn ' t support JavaScript namespaced function . This convenience function allows the usage of namespaced functions . @param functgionName name of the function to be called @param context context in which to find the functon
function executeFunctionByName(functionName, context) {
    var args = Array.prototype.slice.call(arguments, 2);
    var namespaces = functionName.split(".");
    var func = namespaces.pop();
    for (var i = 0; i < namespaces.length; i++) {
        context = context[namespaces[i]];
    }
    return context[func].apply(context, args);
}
function executeFunctionByName ( functionName , context ) { var args = Array . prototype . slice . call ( arguments , 2 ) ; var namespaces = functionName . split ( "." ) ; var func = namespaces . pop ( ) ; for ( var i = 0 ; i < namespaces . length ; i ++ ) { context = context [ namespaces [ i ] ] ; } return context [ func ] . apply ( context , args ) ; }
window[functionName](values, extraData) doesn't support JavaScript namespaced function.
window [ functionName ] ( values extraData ) doesn ' t support JavaScript namespaced function .