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, 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
ConstructorsConstructorDescriptionEmpty constructor, required for JSP tags.CmsJspTagContentLoop(I_CmsXmlContentContainer container, String element) Constructor used when usingcontentloopfrom scriptlet code. -
Method Summary
Modifier and TypeMethodDescriptionintintdoEndTag()intReturns 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).CmsResourceReturns 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.booleanDeprecated.booleanResource iteration method to be used by JSP scriptlet code.protected voidinit(I_CmsXmlContentContainer container) Initializes this content loop tag.booleanReturnstrueif this container is used as a resource preloader.voidrelease()voidsetElement(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 usingcontentloopfrom 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:
doAfterBodyin interfacejavax.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBodyin classjavax.servlet.jsp.tagext.TagSupport- See Also:
-
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:
-
getCollectorName
Description copied from interface:I_CmsResourceContainerReturns the name of the currently used resource collector.- Specified by:
getCollectorNamein interfaceI_CmsResourceContainer- Returns:
- the name of the currently used resource collector
- See Also:
-
getCollectorParam
Description copied from interface:I_CmsResourceContainerReturns the parameters of the currently used resource collector.- Specified by:
getCollectorParamin interfaceI_CmsResourceContainer- Returns:
- the parameters of the currently used resource collector
- See Also:
-
getCollectorResult
Description copied from interface:I_CmsResourceContainerReturns the list of all currently loaded resources (instances of).CmsResource- Specified by:
getCollectorResultin 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_CmsResourceContainerReturns the currently loaded resource.- Specified by:
getResourcein interfaceI_CmsResourceContainer- Returns:
- the currently loaded resource
- See Also:
-
getResourceName
Description copied from interface:I_CmsResourceContainerReturns the resource name in the VFS for the currently loaded resource.- Specified by:
getResourceNamein interfaceI_CmsResourceContainer- Returns:
- the resource name in the VFS for the currently loaded resource
- See Also:
-
getXmlDocument
Description copied from interface:I_CmsXmlContentContainerReturns the currently loaded OpenCms XML content document.- Specified by:
getXmlDocumentin interfaceI_CmsXmlContentContainer- Returns:
- the currently loaded OpenCms XML content document
- See Also:
-
getXmlDocumentElement
Description copied from interface:I_CmsXmlContentContainerReturns the currently selected element name in the loaded XML content document.- Specified by:
getXmlDocumentElementin interfaceI_CmsXmlContentContainer- Returns:
- the currently selected element name in the loaded XML content document
- See Also:
-
getXmlDocumentLocale
Description copied from interface:I_CmsXmlContentContainerReturns the currently selected locale used for acessing the content in the loaded XML content document.- Specified by:
getXmlDocumentLocalein 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_CmsResourceContainerResource 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:
hasMoreContentin interfaceI_CmsResourceContainer- Returns:
trueif more resources are to be iterated- See Also:
-
hasMoreResources
Description copied from interface:I_CmsResourceContainerResource 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:
hasMoreResourcesin interfaceI_CmsResourceContainer- Returns:
trueif more resources are to be iterated- See Also:
-
isPreloader
Description copied from interface:I_CmsResourceContainerReturnstrueif this container is used as a resource preloader.A resource preloader is used to load resources without looping through it.
- Specified by:
isPreloaderin interfaceI_CmsResourceContainer- Returns:
trueif this container is used as a resource preloader- See Also:
-
release
- Specified by:
releasein interfacejavax.servlet.jsp.tagext.Tag- Overrides:
releasein classjavax.servlet.jsp.tagext.TagSupport- See Also:
-
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
-