Package org.opencms.jsp
Class CmsJspTagContentLoop
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.opencms.jsp.CmsJspTagContentLoop
- All Implemented Interfaces:
Serializable
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
,I_CmsResourceContainer
,I_CmsXmlContentContainer
public class CmsJspTagContentLoop
extends javax.servlet.jsp.tagext.TagSupport
implements I_CmsXmlContentContainer
Used to loop through the element values of an XML content item.
- Since:
- 6.0.0
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
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
ConstructorsConstructorDescriptionEmpty constructor, required for JSP tags.CmsJspTagContentLoop
(I_CmsXmlContentContainer container, String element) Constructor used when usingcontentloop
from scriptlet code. -
Method Summary
Modifier and TypeMethodDescriptionint
int
doEndTag()
int
Returns the name of the currently used resource collector.Returns the parameters of the currently used resource collector.Returns the list of all currently loaded resources (instances of
).CmsResource
Returns the name of the content node element to show.Returns the currently loaded resource.Returns the resource name in the VFS for the currently loaded resource.Returns the currently loaded OpenCms XML content document.Returns the currently selected element name in the loaded XML content document.Returns the currently selected locale used for acessing the content in the loaded XML content document.boolean
Deprecated.boolean
Resource iteration method to be used by JSP scriptlet code.protected void
init
(I_CmsXmlContentContainer container) Initializes this content loop tag.boolean
Returnstrue
if this container is used as a resource preloader.void
release()
void
setElement
(String element) Sets the name of the content node element to show.Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
CmsJspTagContentLoop
public CmsJspTagContentLoop()Empty constructor, required for JSP tags. -
CmsJspTagContentLoop
Constructor used when usingcontentloop
from scriptlet code.- Parameters:
container
- the parent content container that provides the content element to loopelement
- the element to loop in the content
-
-
Method Details
-
doAfterBody
- Specified by:
doAfterBody
in interfacejavax.servlet.jsp.tagext.IterationTag
- Overrides:
doAfterBody
in classjavax.servlet.jsp.tagext.TagSupport
- See Also:
-
TagSupport.doAfterBody()
-
doEndTag
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.TagSupport
- See Also:
-
Tag.doEndTag()
-
doStartTag
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
- See Also:
-
Tag.doStartTag()
-
getCollectorName
Description copied from interface:I_CmsResourceContainer
Returns the name of the currently used resource collector.- Specified by:
getCollectorName
in interfaceI_CmsResourceContainer
- Returns:
- the name of the currently used resource collector
- See Also:
-
getCollectorParam
Description copied from interface:I_CmsResourceContainer
Returns the parameters of the currently used resource collector.- Specified by:
getCollectorParam
in interfaceI_CmsResourceContainer
- Returns:
- the parameters of the currently used resource collector
- See Also:
-
getCollectorResult
Description copied from interface:I_CmsResourceContainer
Returns the list of all currently loaded resources (instances of
).CmsResource
- Specified by:
getCollectorResult
in interfaceI_CmsResourceContainer
- Returns:
- the list of all currently loaded resources
- See Also:
-
getElement
Returns the name of the content node element to show.- Returns:
- the name of the content node element to show
-
getResource
Description copied from interface:I_CmsResourceContainer
Returns the currently loaded resource.- Specified by:
getResource
in interfaceI_CmsResourceContainer
- Returns:
- the currently loaded resource
- See Also:
-
getResourceName
Description copied from interface:I_CmsResourceContainer
Returns the resource name in the VFS for the currently loaded resource.- Specified by:
getResourceName
in interfaceI_CmsResourceContainer
- Returns:
- the resource name in the VFS for the currently loaded resource
- See Also:
-
getXmlDocument
Description copied from interface:I_CmsXmlContentContainer
Returns the currently loaded OpenCms XML content document.- Specified by:
getXmlDocument
in interfaceI_CmsXmlContentContainer
- Returns:
- the currently loaded OpenCms XML content document
- See Also:
-
getXmlDocumentElement
Description copied from interface:I_CmsXmlContentContainer
Returns the currently selected element name in the loaded XML content document.- Specified by:
getXmlDocumentElement
in interfaceI_CmsXmlContentContainer
- Returns:
- the currently selected element name in the loaded XML content document
- See Also:
-
getXmlDocumentLocale
Description copied from interface:I_CmsXmlContentContainer
Returns the currently selected locale used for acessing the content in the loaded XML content document.- Specified by:
getXmlDocumentLocale
in interfaceI_CmsXmlContentContainer
- Returns:
- the currently selected locale used for acessing the content in the loaded XML content document
- See Also:
-
hasMoreContent
Deprecated.Description copied from interface:I_CmsResourceContainer
Resource iteration method to be used by JSP scriptlet code.Calling this method will insert "direct edit" HTML to the output page (if required).
- Specified by:
hasMoreContent
in interfaceI_CmsResourceContainer
- Returns:
true
if more resources are to be iterated- See Also:
-
hasMoreResources
Description copied from interface:I_CmsResourceContainer
Resource iteration method to be used by JSP scriptlet code.Calling this method will insert "direct edit" HTML to the output page (if required).
- Specified by:
hasMoreResources
in interfaceI_CmsResourceContainer
- Returns:
true
if more resources are to be iterated- See Also:
-
isPreloader
Description copied from interface:I_CmsResourceContainer
Returnstrue
if this container is used as a resource preloader.A resource preloader is used to load resources without looping through it.
- Specified by:
isPreloader
in interfaceI_CmsResourceContainer
- Returns:
true
if this container is used as a resource preloader- See Also:
-
release
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classjavax.servlet.jsp.tagext.TagSupport
- See Also:
-
Tag.release()
-
setElement
Sets the name of the content node element to show.- Parameters:
element
- the name of the content node element to show
-
init
Initializes this content loop tag.- Parameters:
container
- the parent content container that provides the content element to loop
-