Package org.opencms.jsp
Class CmsJspTagDecorate
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- org.opencms.jsp.CmsJspTagDecorate
-
- 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 CmsJspTagDecorate extends javax.servlet.jsp.tagext.BodyTagSupport
Implements the<cms:decorate></cms:decorate>
tag to decorate HTML content with configurated decoration maps.- Since:
- 6.1.3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_DECORATOR_CONFIGURATION
The name of the default decorator configuration.static java.lang.String
PROPERTY_CATEGORY
The property to store the decorator classname .
-
Constructor Summary
Constructors Constructor Description CmsJspTagDecorate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
decorateTagAction(java.lang.String content, java.lang.String configFile, java.lang.String locale, javax.servlet.ServletRequest req)
Internal action method.int
doEndTag()
java.lang.String
getFile()
Returns the file name.java.lang.String
getLocale()
Returns the locale name.java.lang.String
getNoAutoCloseTags()
Getter for the attribute "noAutoCloseTags" of the <cms:parse> tag.boolean
isAllowInlineEdit()
Returns if the parse action should be disabled to allow inline editing in the container page editor.void
setAllowInlineEdit(boolean allowInlineEdit)
Sets if the parse action should be disabled to allow inline editing in the container page editor.void
setFile(java.lang.String file)
Sets the file name.void
setLocale(java.lang.String locale)
Sets the locale name.void
setNoAutoCloseTags(java.lang.String noAutoCloseTagList)
Setter for the attribute "noAutoCloseTags" of the <cms:parse> tag.-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Field Detail
-
DEFAULT_DECORATOR_CONFIGURATION
public static final java.lang.String DEFAULT_DECORATOR_CONFIGURATION
The name of the default decorator configuration.- See Also:
- Constant Field Values
-
PROPERTY_CATEGORY
public static final java.lang.String PROPERTY_CATEGORY
The property to store the decorator classname .- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsJspTagDecorate
public CmsJspTagDecorate()
-
-
Method Detail
-
decorateTagAction
public java.lang.String decorateTagAction(java.lang.String content, java.lang.String configFile, java.lang.String locale, javax.servlet.ServletRequest req)
Internal action method.DEcorates a HTMl content block.
- Parameters:
content
- the content to be decoratedconfigFile
- the config filelocale
- the locale to use for decoration or NOLOCALE if not locale should be usedreq
- the current request- Returns:
- the decorated content
-
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
- Returns:
- EVAL_PAGE
- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong- See Also:
Tag.doEndTag()
-
getFile
public java.lang.String getFile()
Returns the file name.- Returns:
- the file name
-
getLocale
public java.lang.String getLocale()
Returns the locale name.- Returns:
- the locale name
-
getNoAutoCloseTags
public java.lang.String getNoAutoCloseTags()
Getter for the attribute "noAutoCloseTags" of the <cms:parse> tag.Returns a
String
that consists of the comma-separated upper case tag names for which this tag will not correct missing closing tags.- Returns:
- a String that consists of the comma-separated upper case tag names for which this tag will not correct missing closing tags.
-
isAllowInlineEdit
public boolean isAllowInlineEdit()
Returns if the parse action should be disabled to allow inline editing in the container page editor.- Returns:
true
if the parse action should be disabled to allow inline editing in the container page editor
-
setAllowInlineEdit
public void setAllowInlineEdit(boolean allowInlineEdit)
Sets if the parse action should be disabled to allow inline editing in the container page editor.- Parameters:
allowInlineEdit
-true
to allow inline editing
-
setFile
public void setFile(java.lang.String file)
Sets the file name.- Parameters:
file
- the file name
-
setLocale
public void setLocale(java.lang.String locale)
Sets the locale name.- Parameters:
locale
- the locale name
-
setNoAutoCloseTags
public void setNoAutoCloseTags(java.lang.String noAutoCloseTagList)
Setter for the attribute "noAutoCloseTags" of the <cms:parse> tag.Awaits a
String
that consists of the comma-separated upper case tag names for which this tag should not correct missing closing tags.- Parameters:
noAutoCloseTagList
- aString
that consists of the comma-separated upper case tag names for which this tag should not correct missing closing tags.
-
-