Klasse MappedTemplateLink
- Alle implementierten Schnittstellen:
ApplicationTool
$link.setPage("index.vm").addPathInfo("hello","world")
This would return: http://foo.com/Turbine/template/index.vm/hello/world
This is an application pull tool for the template system. You should not use it in a normal application!
- Version:
- $Id: TemplateLink.java 1854688 2019-03-03 10:36:42Z tv $
- Autor:
- Dave Bryson, Jon S. Stevens, Henning P. Schmiedehausen, Quinton McCombs, Peter Courcoux
-
Feldübersicht
Von Klasse geerbte Felder org.apache.turbine.services.pull.tools.TemplateLink
template, TEMPLATE_LINK_ENCODING_DEFAULT, TEMPLATE_LINK_ENCODING_KEY, TEMPLATE_LINK_PREFIX, TEMPLATE_LINK_RELATIVE_DEFAULT, TEMPLATE_LINK_RELATIVE_KEY, templateURI, wantRelative
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungBuilds the URL with all of the data URL-encoded as well as encoded using HttpServletResponse.encodeUrl().Builds the URL with all of the data URL-encoded as well as encoded using HttpServletResponse.encodeUrl().Von Klasse geerbte Methoden org.apache.turbine.services.pull.tools.TemplateLink
addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, getAbsoluteURI, getLink, getPage, getReference, getRelativeURI, getURI, init, refresh, removePathInfo, removePathInfo, removeQueryData, removeQueryData, setAction, setActionEvent, setEncodeURLOff, setPage, setReference, setScreen, toString
-
Konstruktordetails
-
MappedTemplateLink
public MappedTemplateLink()
-
-
Methodendetails
-
getAbsoluteLink
Builds the URL with all of the data URL-encoded as well as encoded using HttpServletResponse.encodeUrl(). The resulting URL is absolute; it starts with http/https...TemplateURI tui = new TemplateURI (data, "UserScreen"); tui.addPathInfo("user","jon"); tui.getAbsoluteLink();
The above call to absoluteLink() would return the String:http://www.server.com/servlets/Turbine/screen/UserScreen/user/jon
After rendering the URI, it clears the pathInfo and QueryString portions of the TemplateURI. So you can use the $link reference multiple times on a page and start over with a fresh object every time.
- Setzt außer Kraft:
getAbsoluteLink
in KlasseTemplateLink
- Gibt zurück:
- A String with the built URL.
-
getRelativeLink
Builds the URL with all of the data URL-encoded as well as encoded using HttpServletResponse.encodeUrl(). The resulting URL is relative to the webserver root.TemplateURI tui = new TemplateURI (data, "UserScreen"); tui.addPathInfo("user","jon"); tui.getRelativeLink();
The above call to relativeLink() would return the String:/servlets/Turbine/screen/UserScreen/user/jon
After rendering the URI, it clears the pathInfo and QueryString portions of the TemplateURI. So you can use the $link reference multiple times on a page and start over with a fresh object every time.
- Setzt außer Kraft:
getRelativeLink
in KlasseTemplateLink
- Gibt zurück:
- A String with the built URL.
-