Usage

is(condition, trueExpression)

Description
Evaluates the given condition and executes trueExpression if the evaluation result is true. If the expression evaluates to false, NULL is returned. This method is often used in HTML attributes, for example to conditionally select, check, disable form elements.
If used in other scripting contexts and the result is used further, a constructr using if() is probably a better choice.

Example

${is(equal(this.name, request.name), 'selected')}

results in

The string 'selected' is returned if the name of the current object and the requested name are equal.

Graph-Browser

About this article
Last change 2018-10-09
Topics