Class Index | File Index

Classes


Namespace myfaces._impl.core._Runtime


Defined in: _Runtime.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<inner>  
n
browser detection code cross ported from dojo 1.2 dojos browser detection code is very sophisticated hence we port it over it allows a very fine grained detection of browsers including the version number this however only can work out if the user does not alter the user agent, which they normally dont! the exception is the ie detection which relies on specific quirks in ie
Method Summary
Method Attributes Method Name and Description
<static>  
myfaces._impl.core._Runtime.addOnLoad(func, func)
onload wrapper for chaining the onload cleanly
<static>  
myfaces._impl.core._Runtime.applyToGlobalNamespace(nms, obj)
applies an object to a namespace basically does what bla.my.name.space = obj does note we cannot use var myNameSpace = fetchNamespace("my.name.space") myNameSpace = obj because the result of fetch is already the object which the namespace points to, hence this function
<static>  
myfaces._impl.core._Runtime.assertType(probe, theType)
general type assertion routine
<static>  
myfaces._impl.core._Runtime.exists(root, subNms)
check if an element exists in the root also allows to check for subelements usage _T.exists(rootElem,"my.name.space")
<static>  
myfaces._impl.core._Runtime.fetchNamespace(nms)
fetches the object the namespace points to
<static>  
myfaces._impl.core._Runtime.getGlobalConfig(configName, defaultValue)
fetches a global config entry
<static>  
myfaces._impl.core._Runtime.getLanguage(lOverride)
returns the internationalisation setting for the given browser so that we can i18n our messages
<static>  
myfaces._impl.core._Runtime.getLocalOrGlobalConfig(configName, localOptions, defaultValue)
gets the local or global options with local ones having higher priority if no local or global one was found then the default value is given back
<static>  
myfaces._impl.core._Runtime.getXHRLvl()
determines the xhr level which either can be 1 for classical level1 1.5 for mozillas send as binary implementation 2 for xhr level 2
<static>  
myfaces._impl.core._Runtime.getXHRObject()
encapsulated xhr object which tracks down various implementations of the xhr object in a browser independent fashion (ie pre 7 used to have non standard implementations because the xhr object standard came after IE had implemented it first newer ie versions adhere to the standard and all other new browsers do anyway)
<static>  
myfaces._impl.core._Runtime.globalEval(code)
global eval on scripts
<static>  
myfaces._impl.core._Runtime.isString(it)
Backported from dojo a failsafe string determination method (since in javascript String != "" typeof alone fails!)
<static>  
myfaces._impl.core._Runtime.iterateClasses(operator)
iterates over all registered singletons in the namespace
<static>  
myfaces._impl.core._Runtime.iterateSingletons(operator)
iterates over all registered singletons in the namespace
<static>  
myfaces._impl.core._Runtime.loadScriptByBrowser(src, type, defer, charSet, async)
load script functionality which utilizes the browser internal script loading capabilities
<static>  
myfaces._impl.core._Runtime.loadScriptEval(src, type, defer, charSet, async)
loads a script and executes it under a global scope
<static>  
myfaces._impl.core._Runtime.reserveNamespace(nms, obj)
reserves a namespace in the specific scope usage: if(_T.reserve("org.apache.myfaces.MyUtils")) { org.apache.myfaces.MyUtils = function() { } } reserves a namespace and if the namespace is new the function itself is reserved or: _T.reserve("org.apache.myfaces.MyUtils", function() { .
<static>  
myfaces._impl.core._Runtime.singletonExtendClass(newCls, extendsCls, protoFuncs, nmsFuncs)
Extends a class and puts a singleton instance at the reserved namespace instead of its original class
Namespace Detail
myfaces._impl.core._Runtime
Field Detail
<inner> n
browser detection code cross ported from dojo 1.2 dojos browser detection code is very sophisticated hence we port it over it allows a very fine grained detection of browsers including the version number this however only can work out if the user does not alter the user agent, which they normally dont! the exception is the ie detection which relies on specific quirks in ie
Method Detail
<static> myfaces._impl.core._Runtime.addOnLoad(func, func)
onload wrapper for chaining the onload cleanly
Parameters:
func
the function which should be added to the load chain (note we cannot rely on return values here, hence jsf.util.chain will fail)
func

<static> myfaces._impl.core._Runtime.applyToGlobalNamespace(nms, obj)
applies an object to a namespace basically does what bla.my.name.space = obj does note we cannot use var myNameSpace = fetchNamespace("my.name.space") myNameSpace = obj because the result of fetch is already the object which the namespace points to, hence this function
Parameters:
{String} nms
the namespace to be assigned to
{Object} obj
the object to be assigned

<static> myfaces._impl.core._Runtime.assertType(probe, theType)
general type assertion routine
Parameters:
probe
the probe to be checked for the correct type
theType
the type to be checked for

<static> myfaces._impl.core._Runtime.exists(root, subNms)
check if an element exists in the root also allows to check for subelements usage _T.exists(rootElem,"my.name.space")
Parameters:
{Object} root
the root element
{String} subNms
the namespace

<static> myfaces._impl.core._Runtime.fetchNamespace(nms)
fetches the object the namespace points to
Parameters:
{String} nms
the namespace which has to be fetched
Returns:
the object the namespace points to or null if nothing is found

<static> myfaces._impl.core._Runtime.getGlobalConfig(configName, defaultValue)
fetches a global config entry
Parameters:
{String} configName
the name of the configuration entry
{Object} defaultValue
Returns:
either the config entry or if none is given the default value

<static> myfaces._impl.core._Runtime.getLanguage(lOverride)
returns the internationalisation setting for the given browser so that we can i18n our messages
Parameters:
lOverride
Returns:
a map with following entires:
  • language: the lowercase language iso code
  • variant: the uppercase variant iso code
null is returned if the browser fails to determine the language settings

<static> myfaces._impl.core._Runtime.getLocalOrGlobalConfig(configName, localOptions, defaultValue)
gets the local or global options with local ones having higher priority if no local or global one was found then the default value is given back
Parameters:
{String} configName
the name of the configuration entry
{String} localOptions
the local options root for the configuration myfaces as default marker is added implicitely
{Object} defaultValue
Returns:
either the config entry or if none is given the default value

<static> myfaces._impl.core._Runtime.getXHRLvl()
determines the xhr level which either can be 1 for classical level1 1.5 for mozillas send as binary implementation 2 for xhr level 2

<static> myfaces._impl.core._Runtime.getXHRObject()
encapsulated xhr object which tracks down various implementations of the xhr object in a browser independent fashion (ie pre 7 used to have non standard implementations because the xhr object standard came after IE had implemented it first newer ie versions adhere to the standard and all other new browsers do anyway)
Returns:
the xhr object according to the browser type

<static> myfaces._impl.core._Runtime.globalEval(code)
global eval on scripts
Parameters:
{String} code

<static> {boolean} myfaces._impl.core._Runtime.isString(it)
Backported from dojo a failsafe string determination method (since in javascript String != "" typeof alone fails!)
Parameters:
{Object} it
the object to be checked for being a string
Returns:
{boolean} true in case of being a string false otherwise

<static> myfaces._impl.core._Runtime.iterateClasses(operator)
iterates over all registered singletons in the namespace
Parameters:
operator
a closure which applies a certain function on the namespace singleton

<static> myfaces._impl.core._Runtime.iterateSingletons(operator)
iterates over all registered singletons in the namespace
Parameters:
operator
a closure which applies a certain function on the namespace singleton

<static> myfaces._impl.core._Runtime.loadScriptByBrowser(src, type, defer, charSet, async)
load script functionality which utilizes the browser internal script loading capabilities
Parameters:
{String} src
the source of the script
{String} type
the type of the script
{Boolean} defer
defer true or false, same as the javascript tag defer param
{String} charSet
the charset under which the script has to be loaded
async

<static> myfaces._impl.core._Runtime.loadScriptEval(src, type, defer, charSet, async)
loads a script and executes it under a global scope
Parameters:
{String} src
the source of the script
{String} type
the type of the script
{Boolean} defer
defer true or false, same as the javascript tag defer param
{String} charSet
the charset under which the script has to be loaded
{Boolean} async
tells whether the script can be asynchronously loaded or not, currently not used

<static> {boolean} myfaces._impl.core._Runtime.reserveNamespace(nms, obj)
reserves a namespace in the specific scope usage: if(_T.reserve("org.apache.myfaces.MyUtils")) { org.apache.myfaces.MyUtils = function() { } } reserves a namespace and if the namespace is new the function itself is reserved or: _T.reserve("org.apache.myfaces.MyUtils", function() { .. }); reserves a namespace and if not already registered directly applies the function the namespace note for now the reserved namespaces reside as global maps justl like jsf.js but we also use a speedup index which is kept internally to reduce the number of evals or loops to walk through those namespaces (eval is a heavy operation and loops even only for namespace resolution introduce (O)2 runtime complexity while a simple map lookup is (O)log n with additional speedup from the engine.
Parameters:
{String} nms
obj
Returns:
{boolean} true if it was not provided false otherwise for further action

<static> myfaces._impl.core._Runtime.singletonExtendClass(newCls, extendsCls, protoFuncs, nmsFuncs)
Extends a class and puts a singleton instance at the reserved namespace instead of its original class
Parameters:
{function|String} newCls
either a unnamed function which can be assigned later or a namespace
{function} extendsCls
the function class to be extended
{Object} protoFuncs
(Map) an optional map of prototype functions which in case of overwriting a base function get an inherited method
nmsFuncs

Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2020 16:08:18 GMT-0500 (EST)