| Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works. |
| Namespace should start with slash '/', as this is what WebWork (DefaultActionMapper) expects. |
Description
This tag is used to create a URL.
You can use the "param" tag inside the body to provide
additional request parameters.
NOTE:
When includeParams is 'all' or 'get', the parameter defined in param tag will take
precedence and will not be overriden if they exists in the parameter submitted. For
example, in Example 3 below, if there is a id parameter in the url where the page this
tag is included like http://://editUser.action?id=3333&name=John
the generated url will be http://:/context>/editUser.action?id=22&name=John
cause the parameter defined in the param tag will take precedence.
Parameters
Name |
Required |
Default |
Type |
Description |
includeParams |
false |
get |
Object/String |
The includeParams attribute may have the value 'none', 'get' or 'all'. |
scheme |
false |
|
Object/String |
Set scheme attribute |
value |
false |
|
Object/String |
The target value to use, if not using action |
action |
false |
|
Object/String |
The action generate url for, if not using value |
namespace |
false |
|
Object/String |
The namespace to use |
method |
false |
|
Object/String |
The method of action to use |
encode |
false |
true |
Boolean |
whether to encode parameters |
includeContext |
false |
true |
Boolean |
whether actual context should be included in url |
portletMode |
false |
|
Object/String |
The resulting portlet mode |
windowState |
false |
|
Object/String |
The resulting portlet window state |
portletUrlType |
false |
|
Object/String |
Specifies if this should be a portlet render or action url |
anchor |
false |
|
Object/String |
The anchor for this URL |
escapeAmp |
false |
|
Object/String |
Whether to escape ampersand (&) to (&) or not, default to true. |
id |
false |
|
Object/String |
id for referencing element. For UI and form tags it will be used as HTML id attribute |
Examples
<-- Example 1 -->
<ww:url value="editGadget.action">
<ww:param name="id" value="%{selected}" />
</ww:url>
<-- Example 2 -->
<ww:url action="editGadget">
<ww:param name="id" value="%{selected}" />
</ww:url>
<-- Example 3-->
<ww:url includeParams="get" >
<:param name="id" value="%{'22'}" />
</ww:url>
|