Package org.opencms.jsp
Class CmsJspTagContentLoop
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.opencms.jsp.CmsJspTagContentLoop
-
- All Implemented Interfaces:
java.io.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CmsJspTagContentLoop()
Empty constructor, required for JSP tags.CmsJspTagContentLoop(I_CmsXmlContentContainer container, java.lang.String element)
Constructor used when usingcontentloop
from scriptlet code.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
doAfterBody()
int
doEndTag()
int
doStartTag()
java.lang.String
getCollectorName()
Returns the name of the currently used resource collector.java.lang.String
getCollectorParam()
Returns the parameters of the currently used resource collector.java.util.List<CmsResource>
getCollectorResult()
Returns the list of all currently loaded resources (instances of
).CmsResource
java.lang.String
getElement()
Returns the name of the content node element to show.CmsResource
getResource()
Returns the currently loaded resource.java.lang.String
getResourceName()
Returns the resource name in the VFS for the currently loaded resource.I_CmsXmlDocument
getXmlDocument()
Returns the currently loaded OpenCms XML content document.java.lang.String
getXmlDocumentElement()
Returns the currently selected element name in the loaded XML content document.java.util.Locale
getXmlDocumentLocale()
Returns the currently selected locale used for acessing the content in the loaded XML content document.boolean
hasMoreContent()
Deprecated.boolean
hasMoreResources()
Resource iteration method to be used by JSP scriptlet code.protected void
init(I_CmsXmlContentContainer container)
Initializes this content loop tag.boolean
isPreloader()
Returnstrue
if this container is used as a resource preloader.void
release()
void
setElement(java.lang.String element)
Sets the name of the content node element to show.
-
-
-
Constructor Detail
-
CmsJspTagContentLoop
public CmsJspTagContentLoop()
Empty constructor, required for JSP tags.
-
CmsJspTagContentLoop
public CmsJspTagContentLoop(I_CmsXmlContentContainer container, java.lang.String element)
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 Detail
-
doAfterBody
public int doAfterBody()
- Specified by:
doAfterBody
in interfacejavax.servlet.jsp.tagext.IterationTag
- Overrides:
doAfterBody
in classjavax.servlet.jsp.tagext.TagSupport
- See Also:
TagSupport.doAfterBody()
-
doEndTag
public int doEndTag()
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.TagSupport
- See Also:
Tag.doEndTag()
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException
- 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
public java.lang.String 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:
I_CmsResourceContainer.getCollectorName()
-
getCollectorParam
public java.lang.String 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:
I_CmsResourceContainer.getCollectorParam()
-
getCollectorResult
public java.util.List<CmsResource> 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:
I_CmsResourceContainer.getCollectorResult()
-
getElement
public java.lang.String getElement()
Returns the name of the content node element to show.- Returns:
- the name of the content node element to show
-
getResource
public CmsResource 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:
I_CmsResourceContainer.getResource()
-
getResourceName
public java.lang.String 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:
I_CmsResourceContainer.getResourceName()
-
getXmlDocument
public I_CmsXmlDocument 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:
I_CmsXmlContentContainer.getXmlDocument()
-
getXmlDocumentElement
public java.lang.String 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:
I_CmsXmlContentContainer.getXmlDocumentElement()
-
getXmlDocumentLocale
public java.util.Locale 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:
I_CmsXmlContentContainer.getXmlDocumentLocale()
-
hasMoreContent
@Deprecated public boolean 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:
I_CmsResourceContainer.hasMoreContent()
-
hasMoreResources
public boolean 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:
I_CmsResourceContainer.hasMoreResources()
-
isPreloader
public boolean 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:
I_CmsResourceContainer.isPreloader()
-
release
public void release()
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classjavax.servlet.jsp.tagext.TagSupport
- See Also:
Tag.release()
-
setElement
public void setElement(java.lang.String element)
Sets the name of the content node element to show.- Parameters:
element
- the name of the content node element to show
-
init
protected void init(I_CmsXmlContentContainer container)
Initializes this content loop tag.- Parameters:
container
- the parent content container that provides the content element to loop
-
-