new HelperMain()
General Helper Class. Provides Access to different Helper Methods for interaction with Elements on an application page
Methods
-
containsQsParam(p_strParam, p_strQs) → {Boolean}
-
Searches for a parameter in a querystring
Parameters:
Name Type Description p_strParam
String Parameter to search for
p_strQs
String Querystring to search in
Returns:
true
if searchstring was found- Type
- Boolean
-
deleteCookie(p_strParam)
-
Deletes a cookie parameter.
Parameters:
Name Type Description p_strParam
String Cookie parameter to delete.
-
deleteParamFromQs(p_strParam, p_strQs) → {String}
-
Parameters:
Name Type Description p_strParam
String p_strQs
String Returns:
qsNew deletes a given qs parameter from an url string n returns the new url
- Type
- String
-
deleteParamFromUrl(p_strParam, p_strUrl) → {String}
-
deletes a given parameter from a given url string and returns the newly created url string
Parameters:
Name Type Description p_strParam
String p_strUrl
String Returns:
l_strLoc
- Type
- String
-
getBaseUrl() → {String}
-
Get base url including rq_SId (in case of no cookie).
Returns:
baseUrl
- Type
- String
-
getCookieValueByParam(p_strParam) → {String}
-
Gets the value of a cookie parameter.
Parameters:
Name Type Description p_strParam
String Cookie parameter to read.
Returns:
Value of cookie parameter,
false
if p_strParam is empty, if no cookie exists or if parameter doesn't exist.- Type
- String
-
getFuncPartCollection()
-
gets all funcpart containers on a page and retunrs them as an array
-
getGuid() → {String}
-
generates and returns a new guid
Returns:
guid
- Type
- String
-
getQsValueByParam(p_strParam, p_strQs) → {String}
-
Parameters:
Name Type Description p_strParam
String p_strQs
String Returns:
qsNew fetch a given qs parameter from an url string and return its value
- Type
- String
-
getUpObject(p_oEl) → {Object}
-
returns the upObject of an element. Element can be selected either by id, guid, by sizzle selecotr or passed directly as html element
Parameters:
Name Type Description p_oEl
Object Returns:
upObject
- Type
- Object
-
getUrlValueByParam(p_strParam, p_strUrl) → {String}
-
Parameters:
Name Type Description p_strParam
String p_strUrl
String Returns:
strValue look up for the value of a specific url parameter within an url string and return its string representation
- Type
- String
-
hexDecodeString(strInput) → {String}
-
decodes a hexacedimal encoded string into an ascii string
Parameters:
Name Type Description strInput
String Returns:
output
- Type
- String
-
hexEncodeString(strInput) → {String}
-
encodes a string into its hexdecimal equivalent
Parameters:
Name Type Description strInput
String Returns:
output
- Type
- String
-
htmlEncode(s, bInsertNbsp, bInsertBr) → {String}
-
Encodes particular html characters.
Parameters:
Name Type Description s
String Html string
bInsertNbsp
Boolean Replace " " with " "?
bInsertBr
Boolean Replace "\n" with "<br>"?
Returns:
Encoded html string.
- Type
- String
-
mergeQueryStrings(string1, string2) → {String}
-
Merges two querystrings
Parameters:
Name Type Description string1
String string2
String Returns:
the merged strings
- Type
- String
-
sanitize(p_str) → {String}
-
converts html special characters to theis corrensponding html entities e.g. < becomes <, " becomes "
Parameters:
Name Type Description p_str
String the raw input string
Returns:
converted String
- Type
- String
-
setCookie(p_strParam, p_strValue, bExpire, l_lTimeOut)
-
Changes or adds a cookie parameter.
Parameters:
Name Type Description p_strParam
String New cookie parameter or parameter to change.
p_strValue
String Value of cookie.
bExpire
Boolean 0 = valid for current session, 1 = valid for 1 year.
l_lTimeOut
Long Time in ms to be added to current year. Overrides bExpire.
Returns:
True
if cookies are enabled, elsefalse
. -
setQsValueByParam(p_strParam, p_strValue, p_strQs, p_bHexEnc) → {String}
-
Parameters:
Name Type Description p_strParam
String p_strValue
String p_strQs
String p_bHexEnc
String Returns:
qsNew sets a specified qs parameter with a given value to an url string that has to be passed to the url. Returns a new url string with the new qs Parameter Value
- Type
- String
-
setUrlSourceParams(p_oHtml, p_strUrl) → {String}
-
Parameters:
Name Type Description p_oHtml
String p_strUrl
String Returns:
strUrl sets source parameters in a given url string depending on the current funcPart Informations
- Type
- String
-
setUrlValueByParam(p_strParam, p_strValue, p_strUrl) → {String}
-
Parameters:
Name Type Description p_strParam
String p_strValue
String p_strUrl
String Returns:
l_strLoc set the value for a given url parameter with a specific value and append it to an url string. Returns the concatenated url string
- Type
- String
-
validateEMail(p_oElement) → {Boolean}
-
validates an email adress against a regular expression, returns true or false depending on the result of the validation and shows an error message, if the value in p_oElement is not a valid email adress
Parameters:
Name Type Description p_oElement
HTML-Element Returns:
status
- Type
- Boolean
-
writeLocalString(oHtml, Value)
-
Creates a local formatted string from an date object or number object and writes it as value into a html control.
Parameters:
Name Type Description oHtml
Reference to a html input control of types "date", "time", "date & time", "integer", "float", "currency" (format settings can be appended here, too).
Value
Value to localize.
Returns:
True
orfalse
.