Home > Contents > Index >
render:packargs
Encodes in the URL the name/value argument pairs passed in and writes them to an output string, in standard form, with ampersand characters (&) separating each name/value pair.
Syntax
<render:packargs outstr="name of output variable
" [packedargs="packed arguments
"]> [<render:argument name="arg1"
value="value1
"/>] </render:packargs>Attributes
outstr (required)
- Name of a variable to create that stores the encoded output string.
packedargs (optional)
- Input. Previously created URL-encoded packed arguments, in standard form; that is, the output of a previous render:packargs tag.
Parameters
render:argument (optional)
- Input. Name/value pairs to be packed by the tag. The names and values of these arguments are URL- encoded and incorporated into the final URL.
- An argument passed in with this parameter takes precedence over an argument passed in with the
packedargs
attribute. If the same argument is passed in with both, thepackedargs
version is overridden by theargument
version.
Description
The GetPageURL element encodes ("packs") the four standard Sites arguments (
c
,cid
,ct
,p
) before creating a dynamic URL with them. If you need to include additional arguments in a URL, use this tag to URL-encode them ("pack" them) before passing them to the GetPageURL element.Use this tag to pack up the arguments and store them as a string. Then, you pass that string to the GetPageURL element through the
render:argument
parameter of a render:callelement tag.If the packed string is passed through the
packedargs
attribute of a render:calltemplate tag, it will be unpacked before calling a template and the unpacked values become part of the passed-in parameters.If you want to pass the packed string as-is, it should be passed as a user defined
render:argument
parameter instead of using thepackedargs
attribute. You'll need to unpack the arguments before using them.Note that the output string of this tag should not be used as a cache criteria.
Error Numbers
The possible values of
errno
include:
Value Description -10004 An argument is missing.Example
This example packs the name/value pair
foo=bar
into a URL-encoded string, calls the GetPageURL element, and passes in several arguments, including the URL-encoded (packed) one :<render:packargs outstr="myPackedArgs">
<render:argument name="foo" value="bar"/></render:packargs> <render:callelement elementname="OpenMarket/Xcelerate/Actions/Publish/GetPageURL">
<render:argument name="packedargs" value='<%=ics.GetVar("myPackedArgs")%>'/> <render:argument name="c" value="Article"/> <render:argument name="cid" value='<%=ics.GetVar("id")%>'/></render:callelement>See Also
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.