Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
assetset:sortlistentry
This tag is a special argument tag to the
assetset:getmultiplevalues
tag that specifies the content of the sort list.Syntax
<assetset:sortlistentry attributetypename="attribute type" attributename="attribute name" [direction="ascending|descending"] />Attributes
attributetypename
(required)- The name of the attribute type to be added to the sort list.
attributename
(required)- The name of the attribute (of the type specified in
attributetypename
) to be added to the sort list.direction
(optional)- The direction in which the assetset should be sorted, based on this attribute value. The default value is
ascending
.Description
This tag provides a shorthand way of specifying the sort list to be used in the
assetset:getmultiplevalues
tag. Rather than using thelistobject
tag family, this set lets the sort list be populated directly as nested tags inside theassetset:getmultiplevalues
tag.The rules for the sort list are defined in the
assetset:getmultiplevalues
tag.Error Numbers
The possible values of
errno
include:
Value Description -10004 A required parameter is missing .Example
The following example, taken from the FirstSite Mark II Product_C Summary template, retrieves several attributes from the Product_C asset.
In this tag, most of the attribute values are set from other variables in the variable space, either because they have been passed in, or because they have been explicitly looked up.
The following table describes the origin of the ICS variables referenced below.
Variable origins Variable name Origin site The site
variable is set as a resarg in all of the templates and SiteEntry assets. As such, it can be expected to be set correctly to the name of the current site.tid The tid
variable is set in the resargs of the called template. Because this code is in a Template, thetid
attribute is set to the value of thetid
variable. If this code had been located in a CSElement, this attribute would have been set to the value of theeid
variable and thettype
attribute would also have been set toCSElement
. See above for details.c The c
variable is specified on the URL and is passed unchanged into the Layout template.cid The cid
variable is specified on the URL and is passed unchanged into the Layout template.tname The tname
variable is set immediately above therender:calltemplate
tag in the Layout template. It is set using therender:lookup
tag, which effectively looks up the actual value of the template name to be rendered. For reasons relating to template replication, it's not a good idea to hard-code asset names in templates. Therender:lookup
tag provides an abstraction around hard-coding attribute values. Out of the box, however, theFSIILayout
template sets the name of the head template asFSIIHead
, and as such the variabletname
resolves toFSIIHead
.p The variable p
is specified on the URL and is passed unchanged into the layout template.<render:lookup key="ProductAttrType" varname="ProductAttrType" site='<%=ics.GetVar("site")%>' tid='<%=ics.GetVar("tid")%>'/> <render:lookup key="NameAttrName" match=":x" varname="NameAttrName" site='<%=ics.GetVar("site")%>' tid='<%=ics.GetVar("tid")%>'/> <render:lookup key="ShortDescription" match=":x" varname="ShortDescription" site='<%=ics.GetVar("site")%>' tid='<%=ics.GetVar("tid")%>'/> <render:lookup key="PriceAttrName" match=":x" varname="PriceAttrName" site='<%=ics.GetVar("site")%>' tid='<%=ics.GetVar("tid")%>'/> <render:lookup key="ImageAttrName" match=":x" varname="ImageAttrName" site='<%=ics.GetVar("site")%>' tid='<%=ics.GetVar("tid")%>'/> <%-- Retrieve them. --%> <assetset:getmultiplevalues name="ProductSet" prefix="product" immediateonly="true" byasset="false"> <assetset:sortlistentry attributetypename='<%=ics.GetVar("ProductAttrType")%>' attributename='<%=ics.GetVar("NameAttrName")%>'/> <assetset:sortlistentry attributetypename='<%=ics.GetVar("ProductAttrType")%>' attributename='<%=ics.GetVar("ShortDescription")%>'/> <assetset:sortlistentry attributetypename='<%=ics.GetVar("ProductAttrType")%>' attributename='<%=ics.GetVar("PriceAttrName")%>'/> <assetset:sortlistentry attributetypename='<%=ics.GetVar("ProductAttrType")%>' attributename='<%=ics.GetVar("ImageAttrName")%>'/> </assetset:getmultiplevalues>See Also
Home > Contents > Index > Oracle JSP Tag Reference
Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.