string Taglib documentation

Version 1.0
Description Mashup String Helpers

Tag serialize string:serialize(...)

Serialize in JSON the given object.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the serialized result.
objecttruetruejava.lang.Object
The Object to serialize in JSON.

Tag truncate string:truncate(...)

Truncates the given text.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the truncated text.
varTruncatedfalsefalsejava.lang.String
Name of the exported variable for the truncated part.
texttruetruejava.lang.String
The text to truncate.
truncateFromtruetrueint
Truncates the text if its length exceeds the given value.
approximationfalsetrueint
The authorized approximation for the 'truncateFrom' limit in order to not truncate in the middle of an HTML tag. Defaults to '30'.
labelShowfalsetruejava.lang.String
The label for the Show link. Defaults to '[Show]'.
labelHidefalsetruejava.lang.String
The label for the Hide link. Defaults to '[Hide]'.

Tag eval string:eval(...)

Evaluates the given string.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the evaluated result.
stringtruetruejava.lang.String
The string to evaluate.
isXmlEscapefalsefalseboolean
Specifies whether the given string is XML escaped by default. Defaults to 'false'.
isJsEscapefalsefalseboolean
Specifies whether the given string is JS escaped by default. Defaults to 'false'.
isHtmlEscapefalsefalseboolean
Specifies whether the given string is HTML escaped by default. Defaults to 'false'.
isUrlEncodefalsefalseboolean
Specifies whether the given string is URL encoded by default. Defaults to 'false'.
isHighlightfalsefalseboolean
Specifies whether the given string is highlighted by default. Defaults to 'true'.
categoryfalsetruecom.exalead.access.feedapi.AbstractCategory
Specifies a MergedCategory to evaluate CATEGORY expressions.
aggregationfalsetruejava.lang.String
Specifies on which aggregation the given category is based. Defaults to 'count'.
facetfalsetruecom.exalead.access.feedapi.MergedFacet
Specifies a MergedFacet to evaluate FACET expressions.
metafalsetruecom.exalead.access.feedapi.Meta
Specifies a Meta to evaluate META expressions.
entryfalsetruecom.exalead.access.feedapi.Entry
Specifies an Entry. Defaults to the first entry.
feedfalsetruecom.exalead.access.feedapi.ResultFeed
Specifies a ResultFeed. Defaults to the ResultFeed of the current widget. Object is of type ResultFeed.
feedsfalsetruejava.util.Map
Specifies a ResultFeed. Defaults to the ResultFeed of the current widget. Object is of type Map(String, ResultFeed).

Tag escape string:escape(...)

Escapes the given value.
Body Content: scriptless
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the escaped result.
valuefalsetrue
The value to escape. If empty it will escape the content of the tag.
escapeTypefalsefalsejava.lang.String
Specifies the escape type to apply. The possible values are: 'JAVASCRIPT', 'HTML, 'XML', 'URL' and 'JSONVALUE'. Defaults to 'JAVASCRIPT'.

Tag unescape string:unescape(...)

Unescapes the given value.
Body Content: scriptless
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the unescaped result.
valuefalsetrue
The value to unescape. If empty it will unescape the content of the tag.
escapeTypefalsefalsejava.lang.String
Specifies the escape type to apply. The possible values are: 'JAVASCRIPT', 'HTML, 'XML' and 'URL'. Defaults to 'JAVASCRIPT'.

Tag formatNumber string:formatNumber(...)

Formats the given number.
Body Content: scriptless
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the formatted result.
valuefalsetruedouble
The value to format. If empty it will format the content of the tag.
patternfalsefalsejava.lang.String
Specifies the pattern to apply according to the DecimalFormat class format. Defaults to '#' or '0.00' if percentage.
percentageOffalsetruedouble
Specifies the 'percentageOf' attribute if you want to retrieve the value in %.

Tag getRandomId string:getRandomId(...)

Returns a unique random ID.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the generated random ID.
prefixfalsefalsejava.lang.String
Specifies a prefix for the ID.

Tag sanitize string:sanitize(...)

Cleans a string in order to keep only alphanumeric and underscore.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the sanitized result.
stringtruetruejava.lang.String
The string to sanitize.

Tag trim string:trim(...)

Removes leading and trailing whitespace.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the trimmed result.
stringtruetruejava.lang.String
The string to trim.

Tag hashCode string:hashCode(...)

Returns the hashCode of the given object.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the hashCode result.
prefixfalsefalsejava.lang.String
Specifies a prefix to prepend to the hashCode.
objecttruetruejava.lang.Object
The object to compute hashCode from.

Tag join string:join(...)

Joins a list into a string
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the join result.
listtruetruejava.util.List
The list to join into a string.
separatorfalsetruejava.lang.String
The separator character to be used for joining the string values. Defaults to ','.

Tag split string:split(...)

Splits a string into an array of String
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
vartruefalsejava.lang.String
Name of the exported variable for the split result. Object exported is of type String[].
stringtruetruejava.lang.String
The string to splits into an array.
separatorfalsetruejava.lang.String
The separator character to be used for splitting the string value. Defaults to ','.

Function isInteger string:isInteger(...)

Returns whether the string is an integer.
Function Class: com.exalead.cv360.searchui.view.jspapi.string.Functions
Function Signature: java.lang.String isInteger(java.lang.String)

Example

  1. < li class="${string:isInteger(meta.value)}" > < /li >

Function isNumeric string:isNumeric(...)

Returns whether the string is numeric.
Function Class: com.exalead.cv360.searchui.view.jspapi.string.Functions
Function Signature: java.lang.String isNumeric(java.lang.String)

Example

  1. < li class="${string:isNumeric(meta.value)}" > < /li >

Function hashCode string:hashCode(...)

Returns the hashCode of the given string.
Function Class: com.exalead.cv360.searchui.view.jspapi.string.Functions
Function Signature: java.lang.String hashCode(java.lang.String, java.lang.String)

Example

  1. < li class="${string:hashCode('prefix_', meta.name)}" > < /li >

Function trim string:trim(...)

Removes leading and trailing whitespace.
Function Class: com.exalead.cv360.searchui.view.jspapi.string.Functions
Function Signature: java.lang.String trim(java.lang.String)

Example

  1. < li class="${string:trim(meta.name)}" > < /li >