|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.util.DynamicURI | +--org.apache.turbine.util.RelativeDynamicURI | +--org.apache.turbine.util.template.RelativeTemplateLink
A customized version of the RelativeDynamicURI to be used in Templates. Here's an example of its Velocity/WebMacro use:
$link.setPage("index.wm").addPathInfo("hello","world")
This would return: /myapp/servlet/myapp/template/index.wm/hello/world
Field Summary | |
private java.lang.String |
template
cache of the template name for getPage() |
private static java.lang.String |
TEMPLATE_KEY
the pathinfo key stored in the DynamicURI |
Fields inherited from class org.apache.turbine.util.DynamicURI |
data, hasPathInfo, hasQueryData, HTTP, HTTPS, PATH_INFO, pathInfo, QUERY_DATA, queryData, redirect, res, scriptName, sd, serverName, serverPort, serverScheme |
Constructor Summary | |
RelativeTemplateLink()
Default constructor |
|
RelativeTemplateLink(RunData data)
Constructor. |
Method Summary | |
java.lang.String |
getPage()
Gets the template variable used by the Template Service. |
java.lang.String |
getURI()
Returns the URI leaving the source intact. |
void |
init(java.lang.Object data)
This will initialise a TemplateLink object that was constructed with the default constructor (ApplicationTool method). |
void |
refresh()
Refresh method - does nothing |
RelativeTemplateLink |
setEncodeURLOff()
This will turn off the execution of res.encodeURL() by making res == null. |
RelativeTemplateLink |
setPage(java.lang.String t)
Sets the template variable used by the Template Service. |
java.lang.String |
toString()
Returns the URI. |
Methods inherited from class org.apache.turbine.util.RelativeDynamicURI |
toString |
Methods inherited from class org.apache.turbine.util.DynamicURI |
add, add, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, getA, getScriptName, getServerData, getServerName, getServerPort, getServerScheme, init, init, init, remove, removePathInfo, removePathInfo, removeQueryData, removeQueryData, renderPathInfo, renderQueryString, setAction, setScreen, setScriptName, setSecure, setSecure, setServerData, setServerName, setServerPort, setServerScheme |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final java.lang.String TEMPLATE_KEY
private java.lang.String template
Constructor Detail |
public RelativeTemplateLink()
The init method must be called before use.
public RelativeTemplateLink(RunData data)
data
- a Turbine RunData object.Method Detail |
public void init(java.lang.Object data)
init
in interface ApplicationTool
data
- assumed to be a RunData objectpublic void refresh()
refresh
in interface ApplicationTool
public RelativeTemplateLink setEncodeURLOff()
public RelativeTemplateLink setPage(java.lang.String t)
t
- A String with the template name.public java.lang.String getPage()
public java.lang.String toString()
toString
in class RelativeDynamicURI
public java.lang.String getURI()
DynamicURI.toString
method of the superclass
(avoiding the local toString implementation).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |