public class CmsJspTagContentLoad extends CmsJspTagResourceLoad implements I_CmsXmlContentContainer
<cms:contentload/> tag,
used to access and display XML content item information from the VFS.
Since version 7.0.2 it is also possible to store the results of the content load in the JSP context
using a CmsJspContentLoadBean. Using this bean the loaded XML content objects can be accessed
directly using the JSP EL and the JSTL. To use this feature, you need to add the var (and optionally
the scope) parameter to the content load tag. For example, if a parameter like
var="myVarName" is provided, then the result of the content load is stored in the JSP
context variable myVarName with an instance of a CmsJspContentLoadBean.
m_cms, m_collector, m_collectorName, m_collectorParam, m_collectorResult, m_contentInfoBean, m_controller, m_pageIndex, m_pageNavLength, m_pageSize, m_param, m_preload, m_property, m_resource, m_resourceName| Constructor and Description |
|---|
CmsJspTagContentLoad()
Empty constructor, required for JSP tags.
|
CmsJspTagContentLoad(I_CmsXmlContentContainer container,
javax.servlet.jsp.PageContext context,
java.lang.String collectorName,
java.lang.String collectorParam,
java.util.Locale locale,
boolean editable)
Constructor used when using
contentload from scriptlet code. |
CmsJspTagContentLoad(I_CmsXmlContentContainer container,
javax.servlet.jsp.PageContext context,
java.lang.String collectorName,
java.lang.String collectorParam,
java.lang.String pageIndex,
java.lang.String pageSize,
java.util.Locale locale,
boolean editable)
Constructor used when using
contentload from scriptlet code. |
CmsJspTagContentLoad(I_CmsXmlContentContainer container,
javax.servlet.jsp.PageContext context,
java.lang.String collectorName,
java.lang.String collectorParam,
java.lang.String pageIndex,
java.lang.String pageSize,
java.util.Locale locale,
CmsDirectEditMode editMode)
Constructor used when using
contentload from scriptlet code. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doLoadNextFile()
Load the next file name from the initialized list of file names.
|
int |
doStartTag() |
java.lang.String |
getEditable()
Returns the editable flag.
|
java.lang.String |
getLocale()
Returns the locale.
|
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 |
hasMoreResources()
Resource iteration method to be used by JSP scriptlet code.
|
protected void |
init(I_CmsXmlContentContainer container)
Initializes this content load tag.
|
boolean |
isEditEmpty()
Returns the edit empty attribute.
|
void |
release() |
void |
setEditable(java.lang.String mode)
Sets the editable mode.
|
void |
setEditEmpty(boolean editEmpty)
Sets the edit empty attribute.
|
void |
setLocale(java.lang.String locale)
Sets the locale.
|
void |
setPostCreateHandler(java.lang.String postCreateHandler)
Sets the post-create handler class name.
|
doAfterBody, doEndTag, doLoadNextResource, getCollector, getCollectorName, getCollectorParam, getCollectorResult, getContentInfoBean, getNextResource, getPageIndex, getPageNavLength, getPageSize, getParam, getPreload, getProperty, getResource, getResourceName, getResourceName, hasMoreContent, init, isPreloader, limitCollectorResult, setCollector, setPageIndex, setPageNavLength, setPageSize, setParam, setPreload, setPropertygetScope, getScopeAsInt, getScopeAsString, getScopeInt, getVar, isScopeVarSet, setScope, setVar, storeAttribute, storeAttributedoInitBody, getBodyContent, getPreviousOut, setBodyContentfindAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCollectorName, getCollectorParam, getCollectorResult, getResource, getResourceName, hasMoreContent, isPreloaderpublic CmsJspTagContentLoad()
public CmsJspTagContentLoad(I_CmsXmlContentContainer container, javax.servlet.jsp.PageContext context, java.lang.String collectorName, java.lang.String collectorParam, java.util.Locale locale, boolean editable) throws javax.servlet.jsp.JspException
contentload from scriptlet code.container - the parent content container (could be a preloader)context - the JSP page contextcollectorName - the collector name to usecollectorParam - the collector param to uselocale - the locale to useeditable - indicates if "direct edit" support is wantedjavax.servlet.jsp.JspException - in case something goes wrongpublic CmsJspTagContentLoad(I_CmsXmlContentContainer container, javax.servlet.jsp.PageContext context, java.lang.String collectorName, java.lang.String collectorParam, java.lang.String pageIndex, java.lang.String pageSize, java.util.Locale locale, boolean editable) throws javax.servlet.jsp.JspException
contentload from scriptlet code.container - the parent content container (could be a preloader)context - the JSP page contextcollectorName - the collector name to usecollectorParam - the collector param to usepageIndex - the display page index (may contain macros)pageSize - the display page size (may contain macros)locale - the locale to useeditable - indicates if "direct edit" support is wantedjavax.servlet.jsp.JspException - in case something goes wrongpublic CmsJspTagContentLoad(I_CmsXmlContentContainer container, javax.servlet.jsp.PageContext context, java.lang.String collectorName, java.lang.String collectorParam, java.lang.String pageIndex, java.lang.String pageSize, java.util.Locale locale, CmsDirectEditMode editMode) throws javax.servlet.jsp.JspException
contentload from scriptlet code.container - the parent content container (could be a preloader)context - the JSP page contextcollectorName - the collector name to usecollectorParam - the collector param to usepageIndex - the display page index (may contain macros)pageSize - the display page size (may contain macros)locale - the locale to useeditMode - indicates which "direct edit" mode is wantedjavax.servlet.jsp.JspException - in case something goes wrongpublic int doStartTag() throws javax.servlet.jsp.JspException, CmsIllegalArgumentException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class CmsJspTagResourceLoadjavax.servlet.jsp.JspExceptionCmsIllegalArgumentExceptionTag.doStartTag()public java.lang.String getEditable()
public java.lang.String getLocale()
public I_CmsXmlDocument getXmlDocument()
I_CmsXmlContentContainergetXmlDocument in interface I_CmsXmlContentContainerI_CmsXmlContentContainer.getXmlDocument()public java.lang.String getXmlDocumentElement()
I_CmsXmlContentContainergetXmlDocumentElement in interface I_CmsXmlContentContainerI_CmsXmlContentContainer.getXmlDocumentElement()public java.util.Locale getXmlDocumentLocale()
I_CmsXmlContentContainergetXmlDocumentLocale in interface I_CmsXmlContentContainerI_CmsXmlContentContainer.getXmlDocumentLocale()public boolean hasMoreResources() throws javax.servlet.jsp.JspException
I_CmsResourceContainerCalling this method will insert "direct edit" HTML to the output page (if required).
hasMoreResources in interface I_CmsResourceContainerhasMoreResources in class CmsJspTagResourceLoadtrue if more resources are to be iteratedjavax.servlet.jsp.JspException - in case something goes wrongI_CmsResourceContainer.hasMoreResources()public boolean isEditEmpty()
public void release()
release in interface javax.servlet.jsp.tagext.Tagrelease in class CmsJspTagResourceLoadTag.release()public void setEditable(java.lang.String mode)
mode - the mode to setpublic void setEditEmpty(boolean editEmpty)
editEmpty - the edit empty attribute to setpublic void setLocale(java.lang.String locale)
locale - the locale to setpublic void setPostCreateHandler(java.lang.String postCreateHandler)
postCreateHandler - the post-create handler class nameprotected void doLoadNextFile() throws CmsException
CmsException - if something goes wrongprotected void init(I_CmsXmlContentContainer container) throws javax.servlet.jsp.JspException
container - the parent container (could be a preloader)javax.servlet.jsp.JspException - in case something goes wrong