|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.request.UrlRenderer
public class UrlRenderer
Takes care of rendering URLs.
Normally Urls are rendered relative to the base Url. Base Url is normally Url of the page being rendered. However, during Ajax request and redirect to buffer rendering the BaseUrl needs to be adjusted.
Constructor Summary | |
---|---|
UrlRenderer(Request request)
Construct. |
Method Summary | |
---|---|
Url |
getBaseUrl()
Returns the base Url. |
java.lang.String |
renderContextPathRelativeUrl(java.lang.String url)
Deprecated. |
java.lang.String |
renderContextRelativeUrl(java.lang.String url)
Renders the URL within context relative to current base URL. |
java.lang.String |
renderFullUrl(Url url)
Renders a full URL in the protocol://hostname:port/path format |
java.lang.String |
renderRelativeUrl(Url url)
Renders the Url relative to currently set Base Url. |
java.lang.String |
renderUrl(Url url)
Renders the Url |
protected java.lang.String |
resolveHost(Url url)
Gets the host name that should be used to render the url |
protected java.lang.Integer |
resolvePort(Url url)
Gets port that should be used to render the url |
protected java.lang.String |
resolveProtocol(Url url)
Gets the protocol that should be used to render the url |
Url |
setBaseUrl(Url base)
Sets the base Url. |
protected boolean |
shouldRenderAsFull(Url url)
Determines whether a URL should be rendered in its full form |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UrlRenderer(Request request)
request
- Request that serves as the base for rendering urlsMethod Detail |
---|
public Url setBaseUrl(Url base)
base
-
public Url getBaseUrl()
public java.lang.String renderUrl(Url url)
url
-
public java.lang.String renderFullUrl(Url url)
protocol://hostname:port/path
format
url
-
protected java.lang.Integer resolvePort(Url url)
url
- url being rendered
null
if none is setprotected java.lang.String resolveHost(Url url)
url
- url being rendered
null
if none is setprotected java.lang.String resolveProtocol(Url url)
url
- url being rendered
null
if none is setpublic java.lang.String renderRelativeUrl(Url url)
Url
object represents part
of URL after Wicket Filter.
For general URLs within context use renderContextPathRelativeUrl(String)
url
-
protected boolean shouldRenderAsFull(Url url)
url
-
true
if URL should be rendered in the full formpublic java.lang.String renderContextRelativeUrl(java.lang.String url)
url
-
@Deprecated public java.lang.String renderContextPathRelativeUrl(java.lang.String url)
url
-
renderContextRelativeUrl(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |