|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.jsp.tagext.SimpleTagSupport
org.loom.tags.AbstractTag
org.loom.tags.AbstractDecoratedTag
org.loom.tags.AbstractHtmlTag
org.loom.tags.core.UrlTag
@Tag(dynamicAttributes=true,
bodyContent=SCRIPTLESS,
example="<l:url action=\"BlogEntries\" event=\"open\" param-foo=\"${foo}\"/>\n<l:url mapping=\"BlogEntries.open\" />\n<l:url href=\"/foo/bar\">Click here</l:url>")
public class UrlTagHTML link. Creates a link to a URL or a Action / event pair. If the tag has a body, renders a HTML link around it. Else, it will use the title attribute as a body. To render just a link, use l:link instead
| Field Summary |
|---|
| Fields inherited from class org.loom.tags.AbstractDecoratedTag |
|---|
decorator |
| Fields inherited from class org.loom.tags.AbstractTag |
|---|
expressionLanguageProxy, loomServletRequestFactory, out, repository, request, response |
| Constructor Summary | |
|---|---|
UrlTag()
|
|
| Method Summary | |
|---|---|
UrlTag |
addParameter(java.lang.String name,
java.lang.Object value)
Adds a parameter to the resulting url |
void |
doTagImpl()
The method that must be implemented by the child class |
HttpMethod |
getMethod()
|
java.lang.Integer |
getTabindex()
|
UrlBuilder |
getUrl()
|
protected void |
initTag()
Initializes the tag attributes |
boolean |
isEncodeParameters()
|
void |
setAction(java.lang.String action)
The action this link points to. |
void |
setCharset(java.lang.String charset)
|
void |
setEncodeParameters(boolean encodeParameters)
|
void |
setEvent(java.lang.String event)
The event this link points to. |
void |
setHash(java.lang.String hash)
The hash of the url (the fragment after '#') |
void |
setHostname(java.lang.String serverName)
The server name to use. |
void |
setHref(java.lang.String href)
HTML attribute The target url. |
void |
setHreflang(java.lang.String hreflang)
|
void |
setMapping(java.lang.String mapping)
The mapping as action.event. |
void |
setMethod(HttpMethod method)
Set the HttpMethod of this link. |
void |
setPort(java.lang.Integer port)
The port to use. |
void |
setRel(java.lang.String rel)
|
void |
setRelative(boolean relative)
true if the url is relative (do not render schema, server or port), false to render a full URL. |
void |
setRequest(LoomServletRequest request)
|
void |
setRev(java.lang.String rev)
|
void |
setScheme(java.lang.String scheme)
The scheme to use. |
void |
setScope(java.lang.String scope)
If var is not null, this is the scope where the value will be stored. |
void |
setShape(java.lang.String shape)
|
void |
setTabindex(java.lang.Integer tabindex)
|
void |
setTarget(java.lang.String target)
|
void |
setType(java.lang.String type)
|
void |
setUrl(UrlBuilder url)
|
void |
setVar(java.lang.String var)
|
| Methods inherited from class org.loom.tags.AbstractHtmlTag |
|---|
addCssClass, getAccesskey, getCssBuilder, getCssClass, getDir, getId, getLang, getName, getStyle, getTitle, getTranslatedTitle, identify, isCssProcessed, isIf, isTranslateTitle, printParentAttributes, renderTag, setAccesskey, setCssClass, setCssProcessed, setDir, setId, setIf, setLang, setName, setStyle, setTitle, setTranslateTitle |
| Methods inherited from class org.loom.tags.AbstractDecoratedTag |
|---|
doTag, getDecorator, getDecoratorInstance, setDecorator |
| Methods inherited from class org.loom.tags.AbstractTag |
|---|
createWriterWrapper, doBody, doBufferedBody, endTag, evaluateExpression, getActionProperty, getAncestorWithClass, getBufferedBody, getExtendedAttributes, getMessagesRepository, getPageContext, getRequest, getResponse, getScopedAttribute, getWriter, removeScopedAttribute, setDynamicAttribute, setExtendedAttribute, setJspContext, setResponse, setScopedAttribute, setWriter |
| Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
|---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.loom.tags.HtmlTag |
|---|
addCssClass, getCssBuilder |
| Methods inherited from interface org.loom.tags.LoomTag |
|---|
getExtendedAttributes, getRequest, getScopedAttribute, setExtendedAttribute, setScopedAttribute |
| Constructor Detail |
|---|
public UrlTag()
| Method Detail |
|---|
public void setRequest(LoomServletRequest request)
setRequest in class AbstractTagprotected void initTag()
AbstractTag
initTag in class AbstractTag
public void doTagImpl()
throws javax.servlet.jsp.JspException,
java.io.IOException
AbstractTag
doTagImpl in class AbstractTagjavax.servlet.jsp.JspException
java.io.IOException@Attribute public void setScope(java.lang.String scope)
page (default), request,
session and application.
@Attribute public void setAction(java.lang.String action)
@Attribute public void setEvent(java.lang.String event)
@Attribute public void setRelative(boolean relative)
@Attribute public void setScheme(java.lang.String scheme)
scheme - the scheme to use. Examples are: "http", "https"@Attribute public void setHostname(java.lang.String serverName)
@Attribute public void setPort(java.lang.Integer port)
port - the port to use. Examples are: 80, 443@Attribute public void setMapping(java.lang.String mapping)
action.event. This method is equivalent to
setting action and event separately.
@Attribute public void setHash(java.lang.String hash)
@Attribute public void setHref(java.lang.String href)
public void setCharset(java.lang.String charset)
public void setHreflang(java.lang.String hreflang)
public void setRel(java.lang.String rel)
public void setRev(java.lang.String rev)
public void setShape(java.lang.String shape)
public void setTarget(java.lang.String target)
public void setType(java.lang.String type)
public void setVar(java.lang.String var)
public UrlTag addParameter(java.lang.String name,
java.lang.Object value)
ParameterContainer
addParameter in interface ParameterContainername - the name of the parametervalue - the value of the parameter
public UrlBuilder getUrl()
getUrl in interface Linkpublic void setUrl(UrlBuilder url)
public HttpMethod getMethod()
getMethod in interface LinkHttpMethod of this link. If null, GET will be usedpublic void setMethod(HttpMethod method)
LinkHttpMethod of this link. /
If specified (and != GET), be aware that you should setup the
javascript needed to actually perform the POST call. Browsers without javascript enabled
(such as web crawlers, or normal browsers with ctrl+click) will ignore this and perform
a GET call that should be accepted and i.e. get this same HTML page.
setMethod in interface Linkpublic boolean isEncodeParameters()
public void setEncodeParameters(boolean encodeParameters)
public void setTabindex(java.lang.Integer tabindex)
public java.lang.Integer getTabindex()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||