Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
render:unpackarg
Retrieves a variable from a packedargs string, optionally removing it from the string.
Syntax
<render:unpackarg packed="string containing packed args" unpack="variable to unpack" remove="true | false" outvar="name of resultant packedargs variable" />Attributes
packed (required)
- A string containing packed args, not the name of the variable. Often the value of the
packedargs
variable.unpack (required)
- The name of the encoded key-value pair to remove from the packed string. A new variable of the same name will be created with the retrieved value.
remove (required)
- Flag specifying whether the key-value pair specified by unpack should be removed from the unpack string or not.
outvar (required)
- Name of the variable to contain the updated value of the packed string.
Description
This tag extracts a name-value pair from a url-encoded (packed) string. It sets the extracted variable into the variable scope for later use. Optionally, it can remove the variable key-value pair entirely. The new packed string is then set as an output variable as well.
In most cases, the packed string will correspond to a variable called
packedargs
. Ifoutvar
is set topackedargs
, then thepackedargs
variable will be overwritten.Error Numbers
The possible values of
errno
include:
Value Description -10004 A required parameter is missing .Example
The following example, taken from the FirstSite II Wrapper CSElement unpacks the
rendermode
variable so that it can be passed into another tag. Therendermode
variable is not removed from thepackedargs
string, leaving the overwrittenpackedargs
variable unchanged.<render:unpackarg unpack="rendermode" remove="false" packed='<%=ics.GetVar("packedargs")%>' outvar="packedargs"/>See Also
Home > Contents > Index > ![]()
FatWire JSP Tag Reference
Copyright 2005,2006,2007,2008 by FatWire Corporation
All rights reserved.