Develop > Presentation layer > WebSphere Commerce foundation tag library


Tag: wcf:url

The wcf:url tag builds a URL and applies the appropriate WebSphere Commerce supported rewriting rules.

It contains the following additions compared to the c:url tag:

Tag Information
Body Content empty
Display Name url

Attributes
Name Required Request-time Type Description
var false true java.lang.String The name of the exported scoped variable for the processed URL.
value true true java.lang.String The URL to process.
context false true java.lang.String The name of the context when specifying a relative URL resource that belongs to a foreign context.
scope false true java.lang.String The scope for the variable specified by var.
type false true java.lang.String Specifies if the current URL is used in an AJAX call. Valid type values are Ajax or Base. The default value is Base. If the type value is Ajax, the scheme for the URL is taken from the current request, rather than from the Struts configuration file.

Variables
No Variables Defined.


Example

The following example forms a URL to display the shopping cart using the <wcf:url> tag. It specifies the URL type as an AJAX call.

<wcf:url var="currentShoppingCartLink" value="ShopCartPageView" type="Ajax">   
<wcf:param name="storeId"   value="${WCParam.storeId}"  />   
<wcf:param name="catalogId" value="${WCParam.catalogId}"/>   
<wcf:param name="langId" value="${WCParam.langId}" />
</wcf:url>


+

Search Tips   |   Advanced Search