org.jboss.portal.theme.tag
Class ThemeTagHandler
java.lang.Object
javax.servlet.jsp.tagext.SimpleTagSupport
org.jboss.portal.theme.tag.ThemeTagHandler
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag
public class ThemeTagHandler
- extends javax.servlet.jsp.tagext.SimpleTagSupport
Tag handler for the theme tag.
The theme tag injects theme resource links into the page. Themes are CSS files, and
their resources (images). The theme tag can inject only the resources of one theme at a time. The href and src
attributes of the link and script tags that are being injected are automatically adjusted to the war context they
reside in. A theme is defined in the /WEB-INF/portal-themes.xml
- Version:
- $LastChangedRevision: 8784 $, $LastChangedDate: 2007-10-28 01:01:46 +0200 (Sun, 28 Oct 2007) $
- Author:
PortalTheme
,
ThemeLink
,
ThemeScript
Method Summary |
void |
doTag()
Render the markup for theme injection into the HEAD tag. |
java.lang.String |
getThemeName()
|
void |
setThemeName(java.lang.String name)
|
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThemeTagHandler
public ThemeTagHandler()
doTag
public void doTag()
throws javax.servlet.jsp.JspException,
java.io.IOException
- Render the markup for theme injection into the HEAD tag.
This tag expects that the theme name is provided via a
http request attribute, keyed by LayoutConstants.ATTR_PAGE
. The request attribute is expected to
contain a PageResult, which in turn exposes an accessor method for the active theme's name. The theme server
(registry of all available themes) also has to be available via a request attribute
(ThemeConstants.ATTR_THEMESERVER).
- Specified by:
doTag
in interface javax.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in class javax.servlet.jsp.tagext.SimpleTagSupport
- Throws:
javax.servlet.jsp.JspException
java.io.IOException
- See Also:
PortalTheme
getThemeName
public java.lang.String getThemeName()
setThemeName
public void setThemeName(java.lang.String name)