Search Page Tags for Adaptive Layout
Tag sortformdata


Generates the data describing the sort option list on this page, and stores it in memory using the variable name specified by the id attribute. It also stores the list of sort options under a key available in the data object. This tag only works with the Search Page Adaptive Layout.

Example:
<pt:searchpage.sortform>
 <pt:searchpage.sortformdata pt:id="sortData"/>
 <pt:logic.concat pt:key="sortOnchange" pt:value1="$sortData.onchange" pt:value2="();" />
 <pt:core.html pt:tag="select" name="$sortData.inputName" onchange="$sortOnchange">
  <pt:logic.foreach pt:data="$sortData.sortOptionsKey" pt:var="option">
   <pt:logic.stringexpr pt:expr="($sortData.selectedValue) == ($option.value)" pt:key="selectedOption"/>
   <pt:logic.if pt:expr="$selectedOption">
    <pt:logic.iftrue>
     <pt:core.html pt:tag="option" selected value="$option.value"><pt:logic.value pt:value="$option.name"/></pt:core.html>
    </pt:logic.iftrue>
    <pt:logic.iffalse>
     <pt:core.html pt:tag="option" value="$option.value"><pt:logic.value pt:value="$option.name"/></pt:core.html>
    </pt:logic.iffalse>
   </pt:logic.if>
  </pt:logic.foreach>
 </pt:core.html>
</pt:searchpage.sortform>


Tag Information
Tag Namesortformdata
Required Parent Tagsortform

Attributes
NameTypeRequiredDefault ValueDescription
idstringtruenullThe name of the variable in memory where the DO data created by this tag is stored. Specify this ID in the data attribute (most commonly the DATAVAR attribute) for any display tag consuming DO data. Multiple data tags can share the same ID, in which case they are added to a list in the order they were processed. The following attributes are added to this Data Object: inputName - The name to be used to submit the form with the value selected.selectedValue - The value of the currently selected type or -1 if none is selected.onchange - The onchange function name to trigger the javascript to submit the form.sortOptionsKey - The key used to store the list of sort options in memory. Each data object in the sort option list has a name and a value that can be retrieved.
scopestringfalseportlet requestThe scope used to store the data. See the Logic tag library for a list of all available scopes.


Copyright 2005 Plumtree Software, Inc.