Class Index | File Index

Classes


Class myfaces._impl._util._Lang


Extends myfaces._impl.core._Runtime.

Defined in: _Lang.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Object singleton for Language related methods, this object singleton decorates the namespace myfaces._impl.core._Runtime and adds a bunch of new methods to what _Runtime provided
Method Summary
Method Attributes Method Name and Description
 
applyArgs(dest, args, argNames)
helper to automatically apply a delivered arguments map or array to its destination which has a field "_" and a full field
 
arrFilter(arr, func, startPos, scope)
foreach implementation utilizing the ECMAScript wherever possible with added functionality
 
arrForEach(arr, func, startPos, scope)
foreach implementation utilizing the ECMAScript wherever possible with added functionality
 
arrIndexOf(arr, element)
adds a EcmaScript optimized indexOf to our mix, checks for the presence of an indexOf functionality and applies it, otherwise uses a fallback to the hold loop method to determine the index
 
arrToString(arr, delimiter)
Concatenates an array to a string
 
byId(reference)
Save document.getElementById (this code was ported over from dojo) the idea is that either a string or domNode can be passed
 
consumeEvent(event)
consume event in a browser independend manner
 
contains(arr, str)
checks if an array contains an element
 
createErrorMsg(sourceClass, func, error)
creates a standardized error message which can be reused by the system
 
creates a neutral form data wrapper over an existing form Data element the wrapper delegates following methods, append and adds makeFinal as finalizing method which returns the final send representation of the element
 
equalsIgnoreCase(source, destination)
equalsIgnoreCase, case insensitive comparison of two strings
 
escapeString(str, except)
escapes a strings special chars (crossported from dojo 1.3+)
 
getEvent(evt)
determines the correct event depending on the browsers state
 
cross port from the dojo lib browser save event resolution
 
getMessage(key, optional, key)
returns a given localized message upon a given key basic java log like templating functionality is included
 
hitch(scope, method)
hitch backported from dojo hitch allows to assign a function to a dedicated scope this is helpful in situations when function reassignments can happen (notably happens often in lazy xhr code)
 
initLocale(newLocale)
(re)inits the currently installed messages so that after loading the main scripts a new locale can be installed optionally to our i18n subsystem
 
Backported from dojo a failsafe string determination method (since in javascript String != "" typeof alone fails!)
 
keyValToStr(key, val, delimiter)
transforms a key value pair into a string
 
mixMaps(dest, src, overwrite, blockFilter)
Helper function to merge two maps into one
 
strToArray(it, splitter)
String to array function performs a string to array transformation
 
trim(str)
hyperfast trim http://blog.stevenlevithan.com/archives/faster-trim-javascript crossported from dojo
 
trimStringInternal(it, splitter)
Helper function to provide a trim with a given splitter regular expression
Class Detail
myfaces._impl._util._Lang()
Object singleton for Language related methods, this object singleton decorates the namespace myfaces._impl.core._Runtime and adds a bunch of new methods to what _Runtime provided
Method Detail
applyArgs(dest, args, argNames)
helper to automatically apply a delivered arguments map or array to its destination which has a field "_" and a full field
Parameters:
dest
the destination object
args
the arguments array or map
argNames
the argument names to be transferred

arrFilter(arr, func, startPos, scope)
foreach implementation utilizing the ECMAScript wherever possible with added functionality
Parameters:
arr
the array to filter
func
the closure to apply the function to, with the syntax defined by the ecmascript functionality function (element<,key, array>)
startPos
(optional) the starting position
scope
(optional) the scope to apply the closure to

arrForEach(arr, func, startPos, scope)
foreach implementation utilizing the ECMAScript wherever possible with added functionality
Parameters:
arr
the array to filter
func
the closure to apply the function to, with the syntax defined by the ecmascript functionality function (element<,key, array>)
startPos
(optional) the starting position
scope
(optional) the scope to apply the closure to

arrIndexOf(arr, element)
adds a EcmaScript optimized indexOf to our mix, checks for the presence of an indexOf functionality and applies it, otherwise uses a fallback to the hold loop method to determine the index
Parameters:
arr
the array
element
the index to search for

arrToString(arr, delimiter)
Concatenates an array to a string
Parameters:
{Array} arr
the array to be concatenated
{String} delimiter
the concatenation delimiter if none is set \n is used
Returns:
the concatenated array, one special behavior to enable j4fry compatibility has been added if no delimiter is used the [entryNumber]+entry is generated for a single entry TODO check if this is still needed it is somewhat outside of the scope of the function and functionality wise dirty

byId(reference)
Save document.getElementById (this code was ported over from dojo) the idea is that either a string or domNode can be passed
Parameters:
{Object} reference
the reference which has to be byIded

consumeEvent(event)
consume event in a browser independend manner
Parameters:
event
the event which should not be propagated anymore

contains(arr, str)
checks if an array contains an element
Parameters:
{Array} arr
array
{String} str
string to check for

createErrorMsg(sourceClass, func, error)
creates a standardized error message which can be reused by the system
Parameters:
sourceClass
the source class issuing the exception
func
the function issuing the exception
error
the error object itself (optional)

createFormDataDecorator(formData)
creates a neutral form data wrapper over an existing form Data element the wrapper delegates following methods, append and adds makeFinal as finalizing method which returns the final send representation of the element
Parameters:
formData
an array

equalsIgnoreCase(source, destination)
equalsIgnoreCase, case insensitive comparison of two strings
Parameters:
source
destination

escapeString(str, except)
escapes a strings special chars (crossported from dojo 1.3+)
Parameters:
str
the string
except
a set of exceptions

getEvent(evt)
determines the correct event depending on the browsers state
Parameters:
evt
incoming event object (note not all browsers have this)
Returns:
an event object no matter what is incoming

getEventTarget(evt)
cross port from the dojo lib browser save event resolution
Parameters:
evt
the event object (with a fallback for ie events if none is present)

getMessage(key, optional, key)
returns a given localized message upon a given key basic java log like templating functionality is included
Parameters:
{String} key
the key for the message
{String} optional
default message if none was found Additionally you can pass additional arguments, which are used in the same way java log templates use the params
key

hitch(scope, method)
hitch backported from dojo hitch allows to assign a function to a dedicated scope this is helpful in situations when function reassignments can happen (notably happens often in lazy xhr code)
Parameters:
{Function} scope
of the function to be executed in
{Function} method
to be executed
Returns:
whatevery the executed method returns

initLocale(newLocale)
(re)inits the currently installed messages so that after loading the main scripts a new locale can be installed optionally to our i18n subsystem
Parameters:
newLocale
locale override

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

keyValToStr(key, val, delimiter)
transforms a key value pair into a string
Parameters:
key
the key
val
the value
delimiter
the delimiter

mixMaps(dest, src, overwrite, blockFilter)
Helper function to merge two maps into one
Parameters:
{|Object|} dest
the destination map
{|Object|} src
the source map
{|boolean|} overwrite
if set to true the destination is overwritten if the keys exist in both maps
blockFilter

strToArray(it, splitter)
String to array function performs a string to array transformation
Parameters:
{String} it
the string which has to be changed into an array
{RegExp} splitter
our splitter reglar expression
Returns:
an array of the splitted string

trim(str)
hyperfast trim http://blog.stevenlevithan.com/archives/faster-trim-javascript crossported from dojo
Parameters:
str

trimStringInternal(it, splitter)
Helper function to provide a trim with a given splitter regular expression
Parameters:
{|String|} it
the string to be trimmed
{|RegExp|} splitter
the splitter regular expressiion FIXME is this still used?

Documentation generated by JsDoc Toolkit 2.1.0 on Tue Sep 06 2011 21:09:21 GMT-0500 (COT)