Package org.opencms.jsp
Class CmsJspTagFormatter
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.opencms.jsp.CmsJspScopedVarBodyTagSuport
org.opencms.jsp.CmsJspTagFormatter
- All Implemented Interfaces:
Serializable
,javax.servlet.jsp.tagext.BodyTag
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
Implementation of the
<cms:formatter var="..." val="..." />
tag,
used to access and display XML content item information in a formatter.- Since:
- 8.0.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected CmsObject
The CmsObject for the current user.protected CmsFlexController
The FlexController for the current request.protected CmsResource
Reference to the last loaded resource element.Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
ConstructorDescriptionEmpty constructor, required for JSP tags.CmsJspTagFormatter
(javax.servlet.jsp.PageContext context, Locale locale) Constructor used when usingformatter
from scriptlet code. -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
int
Returns the locale.getRdfa()
Returns the name for the optional attribute that provides direct access to the RDFA map.getVal()
Returns the name for the optional attribute that provides direct access to the content value map.protected void
init()
Initializes this formatter tag.void
release()
void
Sets the locale.void
Sets the name for the optional attribute that provides direct access to the RDFA map.void
Sets the name for the optional attribute that provides direct access to the content value map.Methods inherited from class org.opencms.jsp.CmsJspScopedVarBodyTagSuport
getScope, getScopeAsInt, getScopeAsString, getScopeInt, getVar, isScopeVarSet, setScope, setVar, storeAttribute, storeAttribute
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
Field Details
-
m_cms
The CmsObject for the current user. -
m_controller
The FlexController for the current request. -
m_resource
Reference to the last loaded resource element.
-
-
Constructor Details
-
CmsJspTagFormatter
public CmsJspTagFormatter()Empty constructor, required for JSP tags. -
CmsJspTagFormatter
public CmsJspTagFormatter(javax.servlet.jsp.PageContext context, Locale locale) throws javax.servlet.jsp.JspException Constructor used when usingformatter
from scriptlet code.- Parameters:
context
- the JSP page contextlocale
- the locale to use- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
-
Method Details
-
doEndTag
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
- See Also:
-
BodyTagSupport.doEndTag()
-
doStartTag
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
CmsIllegalArgumentException
- See Also:
-
Tag.doStartTag()
-
getLocale
Returns the locale.- Returns:
- the locale
-
getRdfa
Returns the name for the optional attribute that provides direct access to the RDFA map.- Returns:
- the name for the optional attribute that provides direct access to the RDFA map
-
getVal
Returns the name for the optional attribute that provides direct access to the content value map.- Returns:
- the name for the optional attribute that provides direct access to the content value map
-
release
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classCmsJspScopedVarBodyTagSuport
- See Also:
-
Tag.release()
-
setLocale
Sets the locale.- Parameters:
locale
- the locale to set
-
setRdfa
Sets the name for the optional attribute that provides direct access to the RDFA map.- Parameters:
rdfa
- the name for the optional attribute that provides direct access to the RDFA map
-
setVal
Sets the name for the optional attribute that provides direct access to the content value map.- Parameters:
val
- the name for the optional attribute that provides direct access to the content value map
-
init
Initializes this formatter tag.- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-