Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel2

 

...

The CMS Library

The CMS library is used for retrieving information from the XperienCentral content management system.

...

Code Block
themeEclipse
<wm:documentLink var="docLink" contentId="${productInfo.document}" dataSource="jdbc/internaldb" />
${docLink}

 

 

AttributeDescriptionRequired

Expression*

contentIdSets the content ID of the document to which a link should be returned.YesYes
dataSourceSets the data source name which can be queried to retrieve more information about the document.YesYes
classNameSpecifies the class name to be used in the class="..." attribute of the resulting HTML link.NoYes
linkTextThe text to be used in building the link. The default value is the title of the document that is referred to.NoYes
mimeTypeOnlySpecifies whether the MIME type of the document should be returned (set to true) or whether to return an HTML link to the document itself (set to false). The default value is false.NoNo
mouseOverTextSpecifies the text to be used in the title="..." attribute of the resulting HTML link. This text is usually shown as a tooltip if the mouse cursor is hovered over the link. The default is the value of the linkText attribute (see above).NoYes
showDocumentTypeIconSpecifies whether the documenttype icon should be shown to left of the link. The default value is false (no icon).NoNo
showTitleOnlySpecifies whether the linkText (see above) should be shown as an HTML link or as normal text. The default value is true (normal text).NoNo
target

Specifies the name of the HTML frame to be used in the target="..." attribute of the resulting link. If the link is clicked, the document is opened in this frame. If no frame with this name can be found, the link is opened in a new browser window. The default value for this attribute is empty which means the link will open in the same window.

NoYes
varSpecifies the JSP variable to store the result in.NoNo
webUserGroupsSets the web user groups who are granted access to the document.NoYes

*The attribute can support EL (Expression Language) values.

...

This displays the back button in a form.

 

AttributeDescriptionRequiredExpression*
handle

Sets the name of the handle that should be used. Valid values: see the description of the available handles above.

YesYes
extraPassOn

Specifies a comma-separated list of extra parameters to be used in generating the URL in the form. This is the URL of the page to display when an action is performed in the form. By default the following values are already passed on: contentid,dbid,typeofpage,step,orgurl,cfe, and forum.

NoYes
target

Specifies the name of the HTML frame to be used in the target="..." attribute of the resulting HTML form tag. The response to the form is displayed in the target frame. If the specified frame does not exist, the response is shown in a new window.

NoYes
frame

If a value (OUTP) for this attribute is specified, an HTML input tag is created as follows in the body of the form tag: <input type="hidden" name="frame" value="OUTP" />. This attribute may be used in conjunction with the attribute "target" to specify the frame to load in the response to the form.

NoYes
onSubmit

Specifies the name of the JavaScript function to be used in the onSubmit="..." attribute of the resulting HTML form tag. This function can be used to, for example, do some error checking on the form data. The default value is empty (no function).

NoYes

*The attribute can support EL (Expression Language) values.

...

The fragment above will look up the form part with the alias "username".

 

AttributeDescriptionRequiredExpression*
alias

Specifies the alias of the form part to search for. This is the alias that is used in the XSL of the form handlers to identify the form part.

YesYes
var

Specifies the JSP variable in which to store the result.

YesNo

*The attribute can support EL (Expression Language) values.

...

The example above retrieves all media items that match a specified term.

 

AttributeDescriptionRequiredExpression*
andnotterms

Specifies the alias of the form part to search for. This is the alias that is used in the XSL of the form handlers to identify the form part.

NoYes
andterms

Specifies the JSP variable in which to store the result.

NoYes
contenttypes

Specifies the content type of the media item (article, image, etc.).

NoYes
createdsince

Specifies the date after which the returned media items must have been created.

NoYes
excludemediaitemids

Specifies the returned media item IDs that need to be excluded.

NoYes
orterms

Specifies the term(s) that the returned media items must have.

NoYes
publicationdatefrom

Specifies the beginning of the date range in which the returned media item was published.

NoYes
publicationdateto

Specifies the end of the date range in which the returned media item was published.

NoYes
referenceddatabasentity

Specifies the database entity the returned media item is linked to.

NoYes
referencedresourceinstance

Specifies the resource instance the returned media item is linked to.

NoYes
resultrange

Specifies the number of returned media items to display.

NoYes
sortascending

Specifies whether to sort the returned media items in ascending order.

NoYes
sortoptions

Specifies how to sort the returned media items. The options are:

  • creationdate
  • mostviewed
  • mostreactions
  • publicationdate
  • modificationdate
  • voteaverage
  • webtitle
  • lastpost
NoYes
statusid

Specifies the media item’s workflow state.

NoYes
websiteid

Specifies the ID of the website from which the media items are retrieved.

NoYes

*The attribute can support EL (Expression Language) values.

...

Code Block
themeEclipse
<wm:image var="photo" url="http://www.gx.nl/images/picture.jpg" alternativeText="a picture" />
${image.htmlTag}

 

 

AttributeDescriptionRequiredExpression*
alias

Specifies the alias of the form part to search for. This is the alias that is used in the XSL of the form handlers to identify the form part.

YesYes
var

Specifies the JSP variable in which to store the result.

YesNo

*The attribute can support EL (Expression Language) values.

...

Code Block
themeEclipse
<wm:includeUrl url="/WEB-INF/presentation/jsp/shared/include/top.jspf" />

 

 

AttributeDescriptionRequiredExpression*
url

Specifies the URL indicating the resource to retrieve the HTML from. To include references to other JSP files, use the relative path found on the “Presentation” tab in XperienCentral.

YesYes
connectionTimeout

Sets the connection timeout in milliseconds for external URLs. The default value is 5000 (= 5 sec.).

NoYes
followRedirects

Specifies whether a redirect should be followed if the URL returns a redirect to another location. The default value is true (= follow the redirect).

NoYes
readTimeout

Sets the read timeout in milliseconds for external URLs. Input. The default value is 10000 (= 10 sec.).

NoYes

*The attribute can support EL (Expression Language) values.

...

Code Block
themeEclipse
<wm:isActive var="componentLoaded" object="${componentObject}"/>
<c:if test="componentLoaded">
...
</c:if>

 

 

AttributeDescriptionRequiredExpression*
object

Specifies the Java object to check.

YesYes
var

Specifies the JSP variable to store the result in.

NoNo

*The attribute can support EL (Expression Language) values.

...

Code Block
themeEclipse
<wm:link var="homepage" reference="${presentationcontext.website.homePage}" linkText="to the homepage" />
Click here to go ${homepage.htmlTag}.

 

 

AttributeDescriptionRequiredExpression*
var

Specifies the JSP variable in which to store the result in.

YesNo
className

Specifies the class name to be used in the class="..." attribute of the resulting HTML link.

NoYes
linkTextSets the text to use when displaying the HTML link. The default value is the title of the page that is linked to.NoYes
mouseOverTextSpecifies the text to be used in the title="..." attribute of the resulting HTML link. This text is usually shown as a tooltip if the mouse cursor is hovered over the link.NoYes

passOn

Specifies a comma separated list of all URL parameters of the current request that need to be included in the link that is built.NoYes
passOnAllParametersSpecifies whether all URL parameters of the current request are included in the link that is built. The default value is false (don't include).NoYes
presentationNameSpecifies an XperienCentral presentation object. The link is rendered by this presentation.NoYes
referenceThe page to link to. If not set, the current page will be used.NoYes
targetSpecify the target to be used in the target="..." attribute of the resulting HTML link. Using this attribute, links can be opened in a new browser window. The default value is empty which means the link will open in the current window.NoYes

*The attribute can support EL (Expression Language) values.

...

The example above assigns a ForumMessage object to the variable message. Some tags like <wm:render> have an attribute object. The variable may be used in such tags.

 

AttributeDescriptionRequiredExpression*
objectid

Sets the numerical ID of the object to retrieve.

YesYes
objectType

Specifies the Java class of the object to retrieve. The objectType should be a fully qualified classname. Note there are some deprecated abbreviations for some classes which are still supported. You should always use the fully qualified classname. In future releases, support for the abbreviations may be dropped.

YesYes
varSpecifies the JSP variable to store the result in.YesNo

*The attribute can support EL (Expression Language) values.

...

Create custom pageParts by defining a .JSPF and an XML descriptor file.

 

AttributeDescriptionRequiredExpression*
label

Specifies the label of the page part to render. This must be an exact match of the value of the <name> defined in the descriptor XML file and the <scope> in that file must be “pagepart”.

YesYes
object

Specifies the object to render. The default value is ${presentationcontext.baseObject} (the object that is rendered by the jsp this tag is in).

NoYes
varSpecifies the JSP variable to store the result in.NoNo

*The attribute can support EL (Expression Language) values.

...

Code Block
themeEclipse
<wm:pageMetaData var="keywords" type="keywords" />
<meta name="keywords" value="${keywords}" />

 

 

AttributeDescriptionRequiredExpression*
type

Specifies the type of metadata. The valid values are keywords and description.

YesYes
varSpecifies the JSP variable to store the result in.YesNo

*The attribute can support EL (Expression Language) values.

...

In the example above, the presentation property named “bullet” is retrieved and its value is returned in the variable bulletImage.

 

AttributeDescriptionRequiredExpression*
label

Specifies the property label to retrieve.

YesYes
varSpecifies the JSP variable to store the result in.YesNo
page

Specifies the page to used to retrieve a style property from. For example, this is used for page images in a navigation menu.

This attribute is only used for properties of type image, button, color and font. For other property types this attribute is ignored.
  
useTargetPageStyleSpecifies whether the style of the target page is used to retrieve a style property instead of the style of the current page. This attribute is only used for properties of type image, button, color and font. For other property types this attribute is ignored.  

*The attribute can support EL (Expression Language) values.

...

The <wm:render> tag renders the object ${element} using whatever presentation is associated with the object in XperienCentral.

 

AttributeDescriptionRequiredExpression*
object

Specifies the object to render. The default value is ${presentationcontext.baseObject} (the object that is rendered by the JSP this tag is in).

YesYes
presentationNameSets the presentation that the object should be rendered with. The default value is empty, which means the object is rendered using the presentation assigned in XperienCentral.YesNo
varSpecifies the JSP variable to store the result in.NoNo

*The attribute can support EL (Expression Language) values.

...

In the example above the image stored in the variable bullet is resized to 20x20 pixels and returned in the variable bulletSmall.

 

AttributeDescriptionRequiredExpression*
height

Sets the height of the resized image in pixels.

YesYes
imageSpecifies the image object to resize.YesNo
varSpecifies the JSP variable to store the result in. YesNo
widthSets the width of the resized image in pixels.YesYes

*The attribute can support EL (Expression Language) values.

...

In the example above all footer Pages (defined in the XperienCentral Configuration menu) are returned in the variable pages. A link to each of these pages is created.

 

AttributeDescriptionRequiredExpression*
label

Specifies the special page label as defined in XperienCentral

YesYes
varSpecifies the JSP variable to store the result in. YesNo

*The attribute can support EL (Expression Language) values.

...

In the example above the text defined for the label "wm_language.form_submit" is retrieved for the current language. A button using this text is displayed.

 

AttributeDescriptionRequiredExpression*
label

Specifies the text label as defined in XperienCentral

YesYes
varSpecifies the JSP variable to store the result in. NoNo

*The attribute can support EL (Expression Language) values.

...

Code Block
themeEclipse
<script type="text/javascript">
alert('page title is ${wmfn:escapeToJavascript(pageVersion.title)}');
</script>

 

 

FunctionDescription

addLineFeed

 

: string

Retrieves a line feed (usually line feeds in JSP pages are ignored).

contains

(object, object[]) : boolean

Returns true if the array contains the instance.

convertToJavaScript

 

(string) : string
Converts HTML code to JavaScript document.write statements.

escapeToJavaScript

 

(string) : string
Replaces \\ with \\\\ and ' with \\' in a string so that it can be used in a JavaScript statement.

escapeToText

 

(string) : string
Surrounds the text part with a <pre> tag so that while processing this part should be taken literally and so that line feeds should be preserved.

formatExternalUrl

 

(string) : string

Prepends http:// before an external URL if it doesn't start with http://, https://, ftp://, file://, javascript:, mailto:, / or #.

formSignatureParameterName

 

(servletcontext) : string
If secure forms are enabled, this function retrieves the name of the secure form request parameter. This function returns the name of the form parameter which should be used for sending the form signature.

indexOf

 

(object, object[]): int
Returns the index of the object in the array or -1 if the array doesn't contain the object.

instanceOf


(object, string): boolean
This is more flexible instanceOf implementation than the built-in Java instanceOf operator.

replaceNewLines

 

(string) : string

Replaces new lines with <br />.

signFormParameters

 

(servletcontext, servletrequest, string) : string
Computes a signature for a set of names for the use of secure forms in SiteWorks.

signFragment

 

(servletcontext, servletrequest, string) : string
Generates a secure forms signature for the given HTML fragment.

sortRows

 

(object[][], int, boolean) : object[]
Sorts a two dimensional array (an array of arrays) by the objects in a column.

sortMaps

 

(sortedmap[], string, boolean) : sortedmap
Sorts an array of SortedMaps by the elements at a specified key.

subArray

 

(object[], int, int) : object[]
Returns a sub array of the original array.

urlEncode

 

(string) : string
The URL encodes a UTF-8 string.

 

Back to Top

 

 

 

...