Logic Tags
Tag existexpr


This tag evaluates whether a shared variable exists 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.existexpr pt:data="testdata" 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 Nameexistexpr

Attributes
NameTypeRequiredDefault ValueDescription
datastringtruenullThe key used to retrieve the shared variable from memory.
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.