Built-In Namespace _global_
Field Attributes | Field Name and Description |
---|---|
<constant> | |
<constant> | |
<constant> |
Method Attributes | Method Name and Description |
---|---|
age_filter(value, param)
|
|
breadcrumbs_macro(param, delimiter)
|
|
clip_filter(input, param, limit, clipping, delimiter)
|
|
default_filter(value, param, defaultValue)
|
|
defineConstants(ctor)
|
|
disableMacro(ctor, name)
Disable a macro with the idle function
|
|
file_macro(param, id, mode)
|
|
fixRssText(rss)
|
|
format_filter(string, param, pattern)
|
|
formatDate(date, pattern)
|
|
formatNumber(number, pattern)
|
|
getDateFormats(type, language)
|
|
getLocale(language)
|
|
getLocales(language)
Creates an array of all available Java locales sorted by their names.
|
|
gettext_macro(param, text)
|
|
getTimeZones(language)
|
|
if_macro(param, firstValue, _is_, secondValue, _then_, firstResult, _else_, secondResult)
Renders a string depending on the comparison of two values.
|
|
image_macro(param, id, mode)
|
|
injectXslDeclaration(xml)
Injects the XSLT stylesheet declaration into an XML string until
Mozilla developers will have mercy.
|
|
link_filter(text, param, url)
|
|
list_macro(param, id, limit)
|
|
ngettext_macro(param, singular, plural)
|
|
nightly()
|
|
now_macro(param, format)
|
|
onStart()
|
|
pluralize(singular)
|
|
poll_macro(param, id, mode)
|
|
quote(str)
|
|
randomize_macro(param, id)
|
|
renderLink(param, url, text, handler)
|
|
renderList(collection, funcOrSkin, itemsPerPage, pageIdx)
|
|
renderPager(collectionOrSize, url, itemsPerPage, pageIdx)
|
|
sendMail(sender, recipient, subject, body)
General mail sending function.
|
|
singularize(plural)
|
|
skin_macro(param, name)
|
|
story_macro(param, id, mode)
|
|
validateEmail(str)
|
|
validateUrl(str)
|
|
value_macro(param, name, value)
|
|
wait(millis)
|
Field Detail
html
Defined in: Global.js.
idle
Defined in: Global.js.
<constant>
LONGDATEFORMAT
Defined in: Global.js.
rome
Defined in: Global.js.
<constant>
SHORTDATEFORMAT
Defined in: Global.js.
<constant>
SQLDATEFORMAT
Defined in: Global.js.
Method Detail
{String}
age_filter(value, param)
Defined in: Global.js.
- Parameters:
- {Date} value
- {Object} param
- Returns:
- {String} The age string of a date
breadcrumbs_macro(param, delimiter)
Defined in: Global.js.
- Parameters:
- {Object} param
- {String} delimiter
{String}
clip_filter(input, param, limit, clipping, delimiter)
Defined in: Global.js.
- Returns:
- {String} The clipped input
countUsers()
Defined in: Global.js.
{Object}
default_filter(value, param, defaultValue)
Defined in: Global.js.
- Parameters:
- {Object} value
- {Object} param
- {Object} defaultValue
- Returns:
- {Object} The value argument if truthy, the defaultValue argument otherwise
{Function}
defineConstants(ctor)
Defined in: Global.js.
- Parameters:
- {HopObject} ctor
- Returns:
- {Function}
{Function}
disableMacro(ctor, name)
Disable a macro with the idle function
Defined in: Global.js.
Defined in: Global.js.
- Returns:
- {Function}
file_macro(param, id, mode)
Defined in: Global.js.
{String}
fixRssText(rss)
Defined in: Global.js.
- Parameters:
- {String} rss
- Returns:
- {String} The fixed RSS string
{String}
format_filter(string, param, pattern)
Defined in: Global.js.
- Parameters:
- {Object} string
- {Object} param
- {String} pattern
- Returns:
- {String} The formatted string
{String}
formatDate(date, pattern)
Defined in: Global.js.
- Parameters:
- {Date} date
- {pattern} pattern
- Returns:
- {String} The formatted date string
{String}
formatNumber(number, pattern)
Defined in: Global.js.
- Parameters:
- {Number} number
- {String} pattern
- Returns:
- {String} The formatted number string
{Array[]}
getDateFormats(type, language)
Defined in: Global.js.
- Returns:
- {Array[]} An array containing the corresponding date formats
{java.util.Locale}
getLocale(language)
Defined in: Global.js.
- Parameters:
- {String} language
- Returns:
- {java.util.Locale} The corresponding locale object
{Object[]}
getLocales(language)
Creates an array of all available Java locales sorted by their names.
Defined in: Global.js.
Defined in: Global.js.
- Parameters:
- {String} language
- The optional language of the locales
- Returns:
- {Object[]} A sorted array containing the corresponding locales
gettext_macro(param, text)
Defined in: Global.js.
- Parameters:
- {Object} param
- {String} text
{Object[]}
getTimeZones(language)
Defined in: Global.js.
- Parameters:
- {String} language
- Returns:
- {Object[]} A sorted array containing the corresponding timezones
{String}
if_macro(param, firstValue, _is_, secondValue, _then_, firstResult, _else_, secondResult)
Renders a string depending on the comparison of two values. If the first
value equals the second value, the first result will be returned; the
second result otherwise.
Defined in: Global.js.
Example: <% if <% macro %> is "value" then "yes!" else "no :(" %>
Defined in: Global.js.
- Parameters:
- {Object} param
- The default Helma macro parameter object
- {String} firstValue
- The first value
- {String} _is_
- Syntactic sugar; should be "is" for legibility
- {String} secondValue
- The second value
- {String} _then_
- Syntactic sugar; should be "then" for legibility
- {String} firstResult
- The first result, ie. the value that will be returned if the first value equals the second one
- {String} _else_
- Syntactic sugar; should be "else" for legibility
- {String} secondResult
- The second result, ie. the value that will be returned if the first value does not equal the second one
- Returns:
- {String} The resulting value
image_macro(param, id, mode)
Defined in: Global.js.
{String}
injectXslDeclaration(xml)
Injects the XSLT stylesheet declaration into an XML string until
Mozilla developers will have mercy.
Defined in: Global.js.
Defined in: Global.js.
- Parameters:
- {String} xml
- An XML string
- Returns:
- {String} An XML string containing the XSLT stylesheet declaration
{String}
link_filter(text, param, url)
Defined in: Global.js.
- Returns:
- {String} The rendered link element
- See:
- renderLink
{String}
link_macro()
Defined in: Global.js.
- Returns:
- {String} The rendered link element
- See:
- renderLink
list_macro(param, id, limit)
Defined in: Global.js.
ngettext_macro(param, singular, plural)
Defined in: Global.js.
nightly()
Defined in: Global.js.
{String}
now_macro(param, format)
Defined in: Global.js.
- Parameters:
- {Object} param
- {String} format
- Returns:
- {String} The formatted current date string
- See:
- formatDate
onStart()
Defined in: Global.js.
{String}
pluralize(singular)
Defined in: Global.js.
- Parameters:
- {String} singular
- Returns:
- {String} The english plural form of the input
poll_macro(param, id, mode)
Defined in: Global.js.
{String}
quote(str)
Defined in: Global.js.
- Parameters:
- {String} str
- Returns:
- {String} The processed string
randomize_macro(param, id)
Defined in: Global.js.
- Parameters:
- {Object} param
- {String} id
renderLink(param, url, text, handler)
Defined in: Global.js.
{String}
renderList(collection, funcOrSkin, itemsPerPage, pageIdx)
Defined in: Global.js.
- Parameters:
- {HopObject|Array} collection
- {Function|Skin} funcOrSkin
- {Number} itemsPerPage
- {Number} pageIdx
- Returns:
- {String} The rendered list
{String}
renderPager(collectionOrSize, url, itemsPerPage, pageIdx)
Defined in: Global.js.
- Parameters:
- {HopObject|Array|Number} collectionOrSize
- {String} url
- {Number} itemsPerPage
- {Number} pageIdx
- Returns:
- {String} The rendered index
{Number}
scheduler()
Defined in: Global.js.
- Returns:
- {Number} The period in milliseconds the scheduler will be called again.
{Number}
sendMail(sender, recipient, subject, body)
General mail sending function. Mails will be queued in app.data.mails.
Defined in: Global.js.
Defined in: Global.js.
- Parameters:
- {String} sender
- The sender's e-mail address
- {Object} recipient
- The recipient's email addresses
- {String} subject
- The e-mail's subject
- {String} body
- The body text of the e-mail
- Returns:
- {Number} The status code of the underlying helma.Mail instance
{String}
singularize(plural)
Defined in: Global.js.
- Parameters:
- {String} plural
- Returns:
- {String} The english singular form of the input
{String}
skin_macro(param, name)
Defined in: Global.js.
- Parameters:
- {Object} param
- {String} name
- Returns:
- {String} The rendered skin
- See:
- HopObject#skin_macro
story_macro(param, id, mode)
Defined in: Global.js.
{String|null}
validateEmail(str)
Defined in: Global.js.
- Parameters:
- {String} str
- Returns:
- {String|null} The e-mail string if valid, null otherwise
{String|null}
validateUrl(str)
Defined in: Global.js.
- Parameters:
- {String} str
- Returns:
- {String|null} The URL string if valid, null otherwise
value_macro(param, name, value)
Defined in: Global.js.
wait(millis)
Defined in: Global.js.
- Parameters:
- {Number} millis