Class Index | File Index

Classes


Class HelperMain

A static instance is available as Helper.
Defined in: <helper_base.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
closeTTP(p_strTTP)
Close Tooltip-Popup
 
containsQsParam(p_strParam, p_strQs)
Searches for a parameter in a querystring
 
deleteCookie(p_strParam)
Deletes a cookie parameter.
 
deleteParamFromQs(p_strParam, p_strUrl)
Deletes parameter from a querystring.
 
deleteParamFromUrl(p_strParam, p_strUrl)
Deletes parameter from an url.
 
Transforms an array to a string; "||" is the separator; "|" as value is marked as "|0".
 
Get the absolute base url (including rq_SId in case of no cookie).
 
Get base url including rq_SId (in case of no cookie).
 
getCookieValueByParam(p_strParam, p_FallbackValue)
Gets value of a cookie parameter.
 
getCurrencyByLocalString(strValue, p_oFormat)
Parses a local formatted string.
 
getCurrencyStringByLocal(strValue, p_oFormat)
Parses a local formatted string.
 
Parses a iso formatted string.
 
getDateByLocalDateString(strValue, p_oFormat)
Parses a local formatted date string.
 
getDateByLocalDateTimeString(strValue, p_oFormat)
Parses a local formatted date-time string.
 
Creates an JavaScript date object from a html control.
 
getFloatByLocalString(strValue, p_oFormat)
Parses a local formatted string.
 
getFloatStringByLocal(strValue, p_oFormat)
Parses a local formatted string.
 
getFupId(html)
Get the id of fup, where control is placed.
 
getIntegerByLocalString(strValue, p_oFormat)
Parses a local formatted string.
 
getIntegerStringByLocal(strValue, p_oFormat)
Parses a local formatted string.
 
Creates an JavaScript number object from a html control.
 
getQsValueByParam(p_strParam, p_strQs)
Get value of a url querystring parameter.
 
getQsValues(p_strQs)
Get map of a url querystring parameters.
 
getUrlValueByParam(p_strParam, p_strUrl)
Get value of a url querystring parameter.
 
getUrlValues(p_strUrl)
Get name - value pairs of a url querystring.
 
Trim right whitespaces from a string.
 
hexEncodeString(strInput)
Encodes a string hexadecimal.
 
htmlEncode(s, bInsertNbsp, bInsertBr)
Encodes particular html characters.
 
Checks, if cookies are enabled.
 
lTrim(s)
Trim left whitespaces from a string.
 
mergeQueryStrings(string1, string2)
Merges two querystrings
 
sendToClipboard(arg, props)
Copies text or the url of an action control to the clipboard
 
setCookie(p_strParam, p_strValue, bExpire, l_lTimeOut)
Changes or adds a cookie parameter.
 
setCurrentDate(p_oHtmlInput, p_bOverwrite)
Sets current date as local formatted string.
 
setQsValueByParam(p_strParam, p_strValue, p_strQs, p_bHexEnc)
Changes value of a parameter in a querstring.
 
setUrlValueByParam(p_strParam, p_strValue, p_strUrl)
Changes value of a url querystring parameter.
 
showTTP(p_oHtml, p_oFup, p_strTTP, p_oAddParams, p_oTTPProps, p_oTTPContentProps)
Shows a Tooltip-Popup
 
toLocalString(oHtml, Value)
Creates a local formatted string from an number string or jsDate.
 
trim(s)
Trim left and right whitespaces from a string.
 
undoCharStuffing(strInput)
Transforms a string to an array; "||" is the separator; "|" as value is marked as "|0".
 
writeLocalString(oHtml, Value, p_bFireEvent)
Creates a local formatted string from an date object or number object and writes it as value into a html control.
Class Detail
HelperMain()
Method Detail
closeTTP(p_strTTP)
Close Tooltip-Popup
Defined in: <helper.js>.
Parameters:
{string} p_strTTP
Name of the tooltip

{Boolean} containsQsParam(p_strParam, p_strQs)
Searches for a parameter in a querystring
Parameters:
{String} p_strParam
Parameter to search for
{String} p_strQs
Querystring to search in
Returns:
{Boolean} true if searchstring was found

deleteCookie(p_strParam)
Deletes a cookie parameter.
Parameters:
{String} p_strParam
Cookie parameter to delete.

deleteParamFromQs(p_strParam, p_strUrl)
Deletes parameter from a querystring.
Parameters:
p_strParam
Querystring parameter to delete.
p_strUrl
Querystring. If not set, querystring of current page is used.
Returns:
New querystring.

deleteParamFromUrl(p_strParam, p_strUrl)
Deletes parameter from an url.
Parameters:
p_strParam
Parameter to delete.
p_strUrl
Url
Returns:
New url.

{string} doCharStuffing(Array)
Transforms an array to a string; "||" is the separator; "|" as value is marked as "|0".
Parameters:
{array} Array
to stuff.
Returns:
{string} Stuffed array entries

{string} getAbsBaseUrl()
Get the absolute base url (including rq_SId in case of no cookie).
Defined in: <helper.js>.
Returns:
{string} Base url.

{string} getBaseUrl()
Get base url including rq_SId (in case of no cookie).
Returns:
{string} Base url.

{String} getCookieValueByParam(p_strParam, p_FallbackValue)
Gets value of a cookie parameter.
Parameters:
{String} p_strParam
Cookie parameter to read.
p_FallbackValue
Returns:
{String} Value of cookie paramter, false if p_strParam is empty, if no cookie exists or if parameter doesn't exist.

{float} getCurrencyByLocalString(strValue, p_oFormat)
Parses a local formatted string.
Defined in: <helper.js>.
Parameters:
{string} strValue
Local formatted string.
p_oFormat
Returns:
{float} javascript number object.

{string} getCurrencyStringByLocal(strValue, p_oFormat)
Parses a local formatted string.
Defined in: <helper.js>.
Parameters:
{string} strValue
Local formatted string.
p_oFormat
Returns:
{string} Currency formatted string.

getDateByIsoString(strValue)
Parses a iso formatted string.
Defined in: <helper.js>.
Parameters:
{string} strValue
iso formatted string.
Returns:
Date.

{date} getDateByLocalDateString(strValue, p_oFormat)
Parses a local formatted date string.
Defined in: <helper.js>.
Parameters:
{string} strValue
Local formatted string.
p_oFormat
Returns:
{date} javascript date object.

{date} getDateByLocalDateTimeString(strValue, p_oFormat)
Parses a local formatted date-time string.
Defined in: <helper.js>.
Parameters:
{string} strValue
Local formatted string.
p_oFormat
Returns:
{date} javascript date object.

getDateObject(oHtml)
Creates an JavaScript date object from a html control.
Defined in: <helper.js>.
Parameters:
{object} oHtml
Reference to a html input control of types "date", "time" or "date & time".
Returns:
JavaScript date object.

{float} getFloatByLocalString(strValue, p_oFormat)
Parses a local formatted string.
Defined in: <helper.js>.
Parameters:
{string} strValue
Local formatted string.
p_oFormat
Returns:
{float} javascript number object.

{string} getFloatStringByLocal(strValue, p_oFormat)
Parses a local formatted string.
Defined in: <helper.js>.
Parameters:
{string} strValue
Local formatted string.
p_oFormat
Returns:
{string} Currency formatted string.

{string} getFupId(html)
Get the id of fup, where control is placed.
Parameters:
{object} html
element
Returns:
{string} Id of fup, where control is placed.

{integer} getIntegerByLocalString(strValue, p_oFormat)
Parses a local formatted string.
Defined in: <helper.js>.
Parameters:
{string} strValue
Local formatted string.
p_oFormat
Returns:
{integer} Javascript number object.

{string} getIntegerStringByLocal(strValue, p_oFormat)
Parses a local formatted string.
Defined in: <helper.js>.
Parameters:
{string} strValue
Local formatted string.
p_oFormat
Returns:
{string} Integer formatted string.

{object} getNumberObject(oHtml)
Creates an JavaScript number object from a html control.
Defined in: <helper.js>.
Parameters:
{object} oHtml
Reference to a html input control of types "integer", "float" or "currency".
Returns:
{object} JavaScript number object.

getQsValueByParam(p_strParam, p_strQs)
Get value of a url querystring parameter.
Parameters:
{String} p_strParam
Querystring parameter.
{String} p_strQs
Querystring. If not set, querystring of current page is used.
Returns:
Parameter value. False, if parameter doesn't exist.

getQsValues(p_strQs)
Get map of a url querystring parameters.
Parameters:
{String} p_strQs
Querystring. If not set, querystring of current page is used.
Returns:
Map

getUrlValueByParam(p_strParam, p_strUrl)
Get value of a url querystring parameter.
Parameters:
{String} p_strParam
Querystring parameter.
{String} p_strUrl
.
Returns:
Parameter value. False, if parameter doesn't exist.

getUrlValues(p_strUrl)
Get name - value pairs of a url querystring.
Parameters:
{String} p_strUrl
.
Returns:
Array. False, if parameter doesn't exist.

helpertrim(s)
Trim right whitespaces from a string.
Defined in: <helper.js>.
Parameters:
s
String with potentially whitespaces.
Returns:
String without unneccessary whitespaces.

hexEncodeString(strInput)
Encodes a string hexadecimal.
Parameters:
strInput
String to encode.
Returns:
encoded string.

{String} htmlEncode(s, bInsertNbsp, bInsertBr)
Encodes particular html characters.
Parameters:
{String} s
Html string
{Boolean} bInsertNbsp
Replace " " with " "?
{Boolean} bInsertBr
Replace "\n" with "<br>"?
Returns:
{String} Encoded html string.

isCookieEnabled()
Checks, if cookies are enabled.
Returns:
True if cookies are enabled, else false.

lTrim(s)
Trim left whitespaces from a string.
Defined in: <helper.js>.
Parameters:
s
String with potentially whitespaces.
Returns:
String without unneccessary whitespaces.

{String} mergeQueryStrings(string1, string2)
Merges two querystrings
Defined in: <helper.js>.
Parameters:
{String} string1
{String} string2
Returns:
{String} the merged strings

{Boolean} sendToClipboard(arg, props)
Copies text or the url of an action control to the clipboard
Defined in: <helper.js>.
Parameters:
{String OR Object} arg
Text to copy (actioncontrol to get the url)
{Array} props
User defined success Message
Returns:
{Boolean} true if successful

setCookie(p_strParam, p_strValue, bExpire, l_lTimeOut)
Changes or adds a cookie parameter.
Parameters:
{String} p_strParam
New cookie paramter or paramter to change.
{String} p_strValue
Value of cookie.
{Boolean} bExpire
0 = valid for current session, 1 = valid for 1 year.
{Long} l_lTimeOut
Time in ms to be addded to current year. Overrides bExpire.
Returns:
True if cookies are enabled, else false.

{Boolean} setCurrentDate(p_oHtmlInput, p_bOverwrite)
Sets current date as local formatted string.
Defined in: <helper.js>.
Parameters:
{Object} p_oHtmlInput
Html input control (getElement(""))
{Boolean} p_bOverwrite
true if p_oHtmlInput should be replaced with current date
Returns:
{Boolean} true

setQsValueByParam(p_strParam, p_strValue, p_strQs, p_bHexEnc)
Changes value of a parameter in a querstring. Adds parameter, if it is not already existing.
Parameters:
{String} p_strParam
Querystring parameter to change. Add parameter if not existing already.
{String} p_strValue
Value of parameter.
{String} p_strQs
Querystring. If not set, querystring of current page is used.
{Boolean} p_bHexEnc
True to encode hex decoded string.
Returns:
New querystring.

setUrlValueByParam(p_strParam, p_strValue, p_strUrl)
Changes value of a url querystring parameter. Adds parameter, if it is not already existing.
Parameters:
{String} p_strParam
Querystring parameter to change. Add parameter if not existing already.
{String} p_strValue
Value of parameter.
{String} p_strUrl
Url
Returns:
New Url.

{string} showTTP(p_oHtml, p_oFup, p_strTTP, p_oAddParams, p_oTTPProps, p_oTTPContentProps)
Shows a Tooltip-Popup
Defined in: <helper.js>.