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:
java.io.Serializable
,javax.servlet.jsp.tagext.BodyTag
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
public class CmsJspTagFormatter extends CmsJspScopedVarBodyTagSuport
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsObject
m_cms
The CmsObject for the current user.protected CmsFlexController
m_controller
The FlexController for the current request.protected CmsResource
m_resource
Reference to the last loaded resource element.
-
Constructor Summary
Constructors Constructor Description CmsJspTagFormatter()
Empty constructor, required for JSP tags.CmsJspTagFormatter(javax.servlet.jsp.PageContext context, java.util.Locale locale)
Constructor used when usingformatter
from scriptlet code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
int
doStartTag()
java.lang.String
getLocale()
Returns the locale.java.lang.String
getRdfa()
Returns the name for the optional attribute that provides direct access to the RDFA map.java.lang.String
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
setLocale(java.lang.String locale)
Sets the locale.void
setRdfa(java.lang.String rdfa)
Sets the name for the optional attribute that provides direct access to the RDFA map.void
setVal(java.lang.String val)
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
-
-
-
-
Field Detail
-
m_controller
protected CmsFlexController m_controller
The FlexController for the current request.
-
m_resource
protected transient CmsResource m_resource
Reference to the last loaded resource element.
-
-
Constructor Detail
-
CmsJspTagFormatter
public CmsJspTagFormatter()
Empty constructor, required for JSP tags.
-
CmsJspTagFormatter
public CmsJspTagFormatter(javax.servlet.jsp.PageContext context, java.util.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 Detail
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException
- 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
public int doStartTag() throws javax.servlet.jsp.JspException, CmsIllegalArgumentException
- 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
public java.lang.String getLocale()
Returns the locale.- Returns:
- the locale
-
getRdfa
public java.lang.String 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
public java.lang.String 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
public void release()
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classCmsJspScopedVarBodyTagSuport
- See Also:
Tag.release()
-
setLocale
public void setLocale(java.lang.String locale)
Sets the locale.- Parameters:
locale
- the locale to set
-
setRdfa
public void setRdfa(java.lang.String rdfa)
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
public void setVal(java.lang.String val)
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
protected void init() throws javax.servlet.jsp.JspException
Initializes this formatter tag.- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
-