gxp.util
¶
The gxp.util
module contains general utility functions for use in GXP
applications.
Functions¶
Public functions.
-
gxp.util.
dispatch
()¶ Parameters: - functions –
Array(Function)
List of functions to be called. All functions will be called with two arguments - a callback to call when the sequence is done and a storage object. - complete –
Function
A function that will be called when all other functions report that they are done. The final callback will be called with the storage object passed to all other functions. - scope –
Object
Optional object to be set as the scope of all functions called.
Allows multiple asynchronous sequences to be called in parallel. A final callback is called when all other sequences report that they are done.
- functions –
-
gxp.util.
getAbsoluteUrl
()¶ Parameters: url – String
Returns: String
Converts the provided url to an absolute url.
-
gxp.util.
getOGCExceptionText
()¶ Parameters: report – Object
The exception report objectReturns: String
A single string representing the possible stack of exception messages.Get a string message from an OGC exception report object.
-
gxp.util.
md5
()¶ Parameters: data – String
Returns: String
md5 hashEncrypts the specified string using MD5.
-
gxp.util.
throttle
()¶ Parameters: - func –
Function
- interval –
Integer
- scope –
Object
Returns: Function
Returns a function, that, when invoked, will only be triggered at most once during a given window of time.
- func –
-
gxp.util.
uniqueName
()¶ Parameters: - name –
String
The name to make unique across this session. - delimiter –
Char
Optional. Delimiter for appending the number that makes the new name unique. Defaults to ” ” (blank).
Returns: String
a unique name based onname
Appends a delimiter and a number to make the passed
name
unique in the current session.- name –