Package org.opencms.jsp
Class CmsJspTagContentCheck
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.opencms.jsp.CmsJspTagContentCheck
- All Implemented Interfaces:
Serializable,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
Used to check the availablity of an XML content item for conditional display.
- Since:
- 6.0.0
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontentCheckTagAction(String elementList, String prefix, boolean checkall, boolean checknone, I_CmsXmlDocument content, Locale locale) Internal action method to check the elements from the provided XML content item.intdoEndTag()intReturns the list of elements to check.Returns the list of elements to check.Returns the list of elements to check.Returns the list of elements to check.Returns the locale used for checking.voidrelease()voidsetIfexists(String elementList) Sets the list of elements to check for.voidsetIfexistsall(String elementList) Sets the list of elements to check for.voidsetIfexistsnone(String elementList) Sets the list of elements to check for.voidsetIfexistsone(String elementList) Sets the list of elements to check for.voidSets the locale used for checking.Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
CmsJspTagContentCheck
public CmsJspTagContentCheck()
-
-
Method Details
-
contentCheckTagAction
public static boolean contentCheckTagAction(String elementList, String prefix, boolean checkall, boolean checknone, I_CmsXmlDocument content, Locale locale) Internal action method to check the elements from the provided XML content item.- Parameters:
elementList- the list of elements to check forprefix- the Xpath prefix to append the elements to (in case of nested schemas)checkall- flag to indicate that all elements should be checkedchecknone- flag to indicate that the check is done for nonexisting elementscontent- the XML content document to check the elements fromlocale- the locale to check the element for- Returns:
- true if the test succeeds, false if the test fails
-
doEndTag
- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.TagSupport- See Also:
-
doStartTag
- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjavax.servlet.jsp.tagext.TagSupport- Throws:
javax.servlet.jsp.JspException- See Also:
-
getIfexists
Returns the list of elements to check.- Returns:
- the list of elements to check
-
getIfexistsall
Returns the list of elements to check.- Returns:
- the list of elements to check
-
getIfexistsnone
Returns the list of elements to check.- Returns:
- the list of elements to check
-
getIfexistsone
Returns the list of elements to check.- Returns:
- the list of elements to check
-
getLocale
Returns the locale used for checking.- Returns:
- the locale used for checking
-
release
- Specified by:
releasein interfacejavax.servlet.jsp.tagext.Tag- Overrides:
releasein classjavax.servlet.jsp.tagext.TagSupport- See Also:
-
setIfexists
Sets the list of elements to check for.- Parameters:
elementList- the list of elements to check for
-
setIfexistsall
Sets the list of elements to check for.- Parameters:
elementList- the list of elements to check for
-
setIfexistsnone
Sets the list of elements to check for.- Parameters:
elementList- the list of elements to check for
-
setIfexistsone
Sets the list of elements to check for.- Parameters:
elementList- the list of elements to check for
-
setLocale
Sets the locale used for checking.- Parameters:
locale- the locale to set
-