|
|||||||||
| 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.tabs.TabTag
@Tag(dynamicAttributes=true,
bodyContent=SCRIPTLESS,
example="<l:tabContainer>\n <l:tab id=\"tab1\">\n Tab1 contents\n </l:tab>\n <l:tab id=\"tab2\" action=\"Dummy\" event=\"bar\" param-parameter1=\"baz\">\n Tab2 contents\n </l:tab>\n</l:tabContainer>")
public class TabTagTabs are rendered as a group of <div> tags to be handled using javascript. When the browser displays the page the currently selected tab is extracted from the URL hash. Browsers with javascript disabled will see all the tabs at once.
For cases where a tab is too heavy to be included on each request (or pages with just too many tabs) the tabs can include an action/event pair. These tabs will only get rendered when the current request is the same pointed by the tab.
| 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 | |
|---|---|
TabTag()
|
|
| Method Summary | |
|---|---|
void |
addCssClass(java.lang.String css)
Add a CSS class to this tag |
TabTag |
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 |
TabContainerTag |
getContainer()
|
CssBuilder |
getCssBuilder()
|
java.lang.String |
getId()
|
HttpMethod |
getMethod()
|
java.lang.String |
getTarget()
|
UrlBuilder |
getUrl()
|
protected void |
initTag()
Initializes the tag attributes |
boolean |
isIf()
|
protected boolean |
renderTag()
This is an method intended for component extension. |
void |
setAction(java.lang.String action)
If not null, this tab will point to the specified action/event pair and clicking it will trigger a request to the server. |
void |
setContainer(TabContainerTag container)
|
void |
setCssClass(java.lang.String cls)
HTML attribute |
void |
setEvent(java.lang.String event)
If not null, this tab will point to the specified action/event pair and clicking it will trigger a request to the server. |
void |
setId(java.lang.String id)
HTML attribute. |
void |
setIf(boolean ifClause)
If false, this tab will not be rendered. |
void |
setMapping(java.lang.String mapping)
The mapping as action.event. |
void |
setMethod(HttpMethod method)
Set the HttpMethod of this link. |
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 |
setTarget(java.lang.String target)
|
| Methods inherited from class org.loom.tags.AbstractDecoratedTag |
|---|
doTag, getDecorator, getDecoratorInstance, setDecorator |
| 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.LoomTag |
|---|
getExtendedAttributes, getRequest, getScopedAttribute, setExtendedAttribute, setScopedAttribute |
| Constructor Detail |
|---|
public TabTag()
| Method Detail |
|---|
public void setRequest(LoomServletRequest request)
setRequest in class AbstractTagprotected boolean renderTag()
AbstractDecoratedTag
renderTag in class AbstractDecoratedTagprotected 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(required=true) public void setId(java.lang.String id)
public java.lang.String getId()
@Attribute public void setAction(java.lang.String action)
@Attribute public void setEvent(java.lang.String event)
@Attribute public void setMapping(java.lang.String mapping)
action.event. This method is equivalent to
setting action and event separately.
@Attribute public void setRelative(boolean relative)
public TabTag 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 setTarget(java.lang.String target)
public java.lang.String getTarget()
@Attribute(name="class") public void setCssClass(java.lang.String cls)
public void addCssClass(java.lang.String css)
HtmlTag
addCssClass in interface HtmlTagcss - the CSS class to be addedpublic CssBuilder getCssBuilder()
getCssBuilder in interface HtmlTagpublic TabContainerTag getContainer()
public void setContainer(TabContainerTag container)
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 isIf()
@Attribute public void setIf(boolean ifClause)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||