Conditional Display (displayIf)

The displayXXXIf family of processors allows you to conditionally show or hide content based on a boolean expression.

Usage

displayParagraphIf(customer.vip)
displayTableRowIf(order.items.size() > 0)
displayTableIf(report.hasData())

Available Methods

Expression Effect
displayParagraphIf(boolean) The paragraph is only displayed if the condition resolves to true.
displayTableRowIf(boolean) The table row around it is only displayed if the condition resolves to true.
displayTableIf(boolean) The surrounding table is only displayed if the condition resolves to true.

There are also convenience methods for checking if objects are present or absent:

displayParagraphIfPresent(customer.address)
displayTableRowIfAbsent(order.discounts)

Navigation

Edit this page