Versions Compared

Key

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

...

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