Logic Tags
Tag intexpr


This tag evaluates an integer expression and stores the result as a boolean in memory. It is designed to work with the logic.if tag.

Example:
<pt:logic.collectionlength pt:data="testcollection" pt:key="length"/>
<pt:logic.intexpr pt:expr="($length) > 1" pt:key="boolvalue"/>
<pt:logic.if pt:expr="$boolvalue">
 <pt:logic.iftrue>
  This is displayed if expr evaluates to true.
 </pt:logic.iftrue>
 <pt:logic.iffalse>
   This is displayed if expr evaluates to false.
 </pt:logic.iffalse>
</pt:logic.if>


Tag Information
Tag Nameintexpr

Attributes
NameTypeRequiredDefault ValueDescription
exprstringtruenullAn integer value or a tag variable, followed by an integer comparator, and then another integer value or tag variable. Spaces can be added around the comparator for legibility if desired. The tag variables must evaluate to an integer and be in $ attribute notation surrounded by parentheses. The following operators are allowed: '==', '!=', '<', and '>'.
keystringtruenullThe key used to store the result in memory.
scopestringfalseportlet requestThe scope used to store the result in memory. See the Logic tag library description for details about valid scope arguments.


Copyright 2005 Plumtree Software, Inc.