|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.webwork.components.Component
com.opensymphony.webwork.components.URL
public class URL
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://
<-- 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>
Param
Field Summary | |
---|---|
protected String |
action
|
static String |
ALL
|
protected String |
anchor
|
protected boolean |
encode
|
protected boolean |
escapeAmp
|
static String |
GET
|
protected boolean |
includeContext
|
protected String |
includeParams
|
protected String |
method
|
protected String |
namespace
|
static String |
NONE
The includeParams attribute may have the value 'none', 'get' or 'all'. |
protected String |
portletMode
|
protected String |
portletUrlType
|
protected String |
scheme
|
protected String |
value
|
protected String |
windowState
|
Fields inherited from class com.opensymphony.webwork.components.Component |
---|
COMPONENT_STACK, id, parameters, stack |
Constructor Summary | |
---|---|
URL(OgnlValueStack stack,
HttpServletRequest req,
HttpServletResponse res)
|
Method Summary | |
---|---|
boolean |
end(Writer writer,
String body)
Callback for the end tag of this component. |
protected void |
mergeRequestParameters(String value,
Map parameters,
Map contextParameters)
Merge request parameters into current parameters. |
void |
setAction(String action)
The action generate url for, if not using value |
void |
setAnchor(String anchor)
The anchor for this URL |
void |
setEncode(boolean encode)
whether to encode parameters |
void |
setEscapeAmp(boolean escapeAmp)
Whether to escape ampersand (&) to (&) or not, default to true. |
void |
setIncludeContext(boolean includeContext)
whether actual context should be included in url |
void |
setIncludeParams(String includeParams)
The includeParams attribute may have the value 'none', 'get' or 'all'. |
void |
setMethod(String method)
The method of action to use |
void |
setNamespace(String namespace)
The namespace to use |
void |
setPortletMode(String portletMode)
The resulting portlet mode |
void |
setPortletUrlType(String portletUrlType)
Specifies if this should be a portlet render or action url |
void |
setScheme(String scheme)
Set scheme attribute |
void |
setValue(String value)
The target value to use, if not using action |
void |
setWindowState(String windowState)
The resulting portlet window state |
boolean |
start(Writer writer)
Callback for the start tag of this component. |
Methods inherited from class com.opensymphony.webwork.components.Component |
---|
addAllParameters, addParameter, altSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getComponentStack, getId, getParameters, getStack, popComponentStack, setId, toString, usesBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NONE
public static final String GET
public static final String ALL
protected String includeParams
protected String scheme
protected String value
protected String action
protected String namespace
protected String method
protected boolean encode
protected boolean includeContext
protected String portletMode
protected String windowState
protected String portletUrlType
protected String anchor
protected boolean escapeAmp
Constructor Detail |
---|
public URL(OgnlValueStack stack, HttpServletRequest req, HttpServletResponse res)
Method Detail |
---|
public boolean start(Writer writer)
Component
start
in class Component
writer
- the output writer.
public boolean end(Writer writer, String body)
Component
end
in class Component
writer
- the output writer.body
- the rendered body.
public void setIncludeParams(String includeParams)
public void setScheme(String scheme)
public void setValue(String value)
public void setAction(String action)
public void setNamespace(String namespace)
public void setMethod(String method)
public void setEncode(boolean encode)
public void setIncludeContext(boolean includeContext)
public void setPortletMode(String portletMode)
public void setWindowState(String windowState)
public void setPortletUrlType(String portletUrlType)
public void setAnchor(String anchor)
public void setEscapeAmp(boolean escapeAmp)
protected void mergeRequestParameters(String value, Map parameters, Map contextParameters)
value
- the value attribute (url to be generated by this component)parameters
- component parameterscontextParameters
- request parameters
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |