url Taglib documentation

Version 1.0
Description Mashup URL Helpers

Tag encode url:encode(...)

URL encodes the given value.
Body Content: scriptless
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the URL encoded result.
valuefalsetruejava.lang.String
The value to URL encode.

Tag decode url:decode(...)

URL decodes the given value.
Body Content: scriptless
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the URL decoded result.
valuefalsetruejava.lang.String
The value to URL decode.

Tag approximate url:approximate(...)

Returns within 'urls' the best approximation for 'closeTo'. It will compare both the path and the query string of the URLs and returns the most accurate URLs within a collection.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the best candidate.
itemstruetruejava.util.List
A list of candidates URLs. Object of type List(String).
closeTofalsetruejava.lang.String
A URL to find approximation to. By default the current URL will be used.

Example

  1. // create a list of URLs
  2. <list:new var="urls" />
  3. <list:add list="urls" add="page" />
  4. <list:add list="urls" add="page?param=value" />
  5. <list:add list="urls" add="page2" />
  6. // retrieve the best approximation for the current url
  7. <url:approximate var="result" items="${urls}">
  8. // handle result
  9. <c:forEach var="item" items="${urls}"
  10. <c:if test="${result == item}">
  11. // selected url
  12. </c:if>
  13. </c:forEach>

Tag getPageName url:getPageName(...)

Returns the page name of the given URL.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the page name.
urlfalsetruejava.lang.String
An URL to retrieve the page name from. By default the current URL is used.

Tag resource url:resource(...)

Creates a URL for a file in the resource directory.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the processed resource URL.
filetruetruejava.lang.String
The file path to process. It is relative to the resource directory.
testIfExistsfalsetrueboolean
Specifies if the given file existence should be tested. If it does not exists then NULL is returned. Defaults to "false".
dataWidgetWrapperfalsetruecom.exalead.cv360.searchui.widgets.DataWidgetWrapper
The DataWidgetWrapper that contains the widgets to retrieve resource from. Defaults to the widget in the current context.

Tag url url:url(...)

Creates a URL.
Body Content: scriptless
Attribute nameRequiredRuntime Expression EvaluationType
varfalsefalsejava.lang.String
Name of the exported variable for the processed URL.
varPageNamefalsefalsejava.lang.String
Name of the exported variable for the page name.
varParametersfalsefalsejava.util.Map
Name of the exported variable for the parameter list. Object of type Map(String, List(String)).
valuefalsetruejava.lang.String
The URL to be processed. It can be either relative or absolute.
keepQueryStringfalsetrueboolean
Specifies whether the URL should keep the current query string or not. Defaults to "false".
xmlEscapefalsefalseboolean
Specifies whether the URL should be XML escaped or not. Defaults to "true".
feedsfalsetruejava.util.Map
The ResultFeed to use for the URL creation. Object is of type Map(String, ResultFeed).
feedfalsetruecom.exalead.access.feedapi.ResultFeed
The ResultFeed to use for the URL creation. Object is of type ResultFeed.

Tag parameter url:parameter(...)

Adds or remove a parameter of the URL tag.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
nametruetruejava.lang.String
Name of the query string parameter.
valuefalsetruejava.lang.String
Value of the parameter.
widgetfalsetruecom.exalead.cv360.searchui.configuration.v10.Widget
If set, the given parameter will be set for this widget. Use a ParameterAdapterWidgetTrigger to process this parameter.
overridefalsetrueboolean
Specifies whether the current query string parameter should be override or not. Defaults to "false".
urlEncodefalsetrueboolean
Specifies whether the current query string parameter should be URL-encoded or not. Defaults to "true".

Tag page url:page(...)

Sets the page parameter.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
valuefalsetrueint
The new page number.

Tag sort url:sort(...)

Sets a sort parameter.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
exprfalsetruejava.lang.String
The new sort expression, if empty it will try to retrieve the current sort expression.
reverseExprfalsetrueboolean
Reverse the sort expression either by clearing it or by switching between asc and desc if possible.
clearfalsetrueboolean
Clears the sort parameters.

Tag refine url:refine(...)

Sets a refine parameter.
Body Content: empty
Attribute nameRequiredRuntime Expression EvaluationType
categorytruetruecom.exalead.access.feedapi.AbstractCategory
The category to refine on.
forceStatefalsetruejava.lang.String
Force the refine state. The possible values are: "REFINED", "EXCLUDED" or "DISPLAYED".
forceRefineOnfalsetruejava.util.List
A list of additional feeds name to refine.
zapRefinementsfalsetrueboolean
Specifies whether the refinements should be completely cancelled ("false") or only the last level ("true"). Defaults to "false".

Function isUrl url:isUrl(...)

Returns whether the given string is a valid URL or not.
Function Class: com.exalead.cv360.searchui.view.jspapi.url.Functions
Function Signature: boolean isUrl(java.lang.String)

Example

  1. < c:if test="${url:isUrl(entry.id)}" >