Package org.opencms.jsp
Class CmsJspXmlContentBean
java.lang.Object
org.opencms.jsp.CmsJspBean
org.opencms.jsp.CmsJspActionElement
org.opencms.jsp.CmsJspXmlContentBean
Provides access to XML content tag functions from scriptlet code.
Otherwise provides all functions from the parent class
.CmsJspActionElement
- Since:
- 6.2.0
-
Field Summary
Fields inherited from class org.opencms.jsp.CmsJspActionElement
NOT_INITIALIZED
-
Constructor Summary
ConstructorDescriptionEmpty constructor, required for every JavaBean.CmsJspXmlContentBean
(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Constructor, with parameters. -
Method Summary
Modifier and TypeMethodDescriptioncontentload
(String collectorName, String collectorParam, boolean editable) Loads a set of
, same as using theI_CmsXmlDocument
<cms:contentload collector="***" param="***" editable="***" />
tag.contentload
(String collectorName, String collectorParam, String pageIndex, String pageSize, Locale locale, boolean editable) Loads a set of
, same as using theI_CmsXmlDocument
<cms:contentload collector="***" param="***" locale="***" editable="***" />
tag.contentload
(String collectorName, String collectorParam, Locale locale, boolean editable) Loads a set of
, same as using theI_CmsXmlDocument
<cms:contentload collector="***" param="***" locale="***" editable="***" />
tag.contentloop
(I_CmsXmlContentContainer container, String element) Enables looping over a list of element values in the given parent container, same as using the<cms:contentloop element="***" />
tag.contentshow
(I_CmsXmlContentContainer container) Returns the currently looped content element String value from the given XML content container, same as using the<cms:contentshow />
tag.contentshow
(I_CmsXmlContentContainer container, String element) Returns the selected content element String value from the given XML content container, same as using the<cms:contentshow element="***" />
tag.contentshow
(I_CmsXmlContentContainer container, String element, Locale locale) Returns the selected content element String value from the given XML content container, same as using the<cms:contentshow element="***" locale="***" />
tag.Methods inherited from class org.opencms.jsp.CmsJspActionElement
editable, editable, editable, editableManualClose, editableManualOpen, getContent, getContent, getMessages, getMessages, getMessages, getMessages, getNavigation, getNavigationUri, img, img, include, include, include, include, include, include, includeSilent, includeSilent, includeSilent, includeSilent, info, label, link, link, properties, properties, property, property, property, property, template, template, template, toAbsolute, user
Methods inherited from class org.opencms.jsp.CmsJspBean
getCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, handleMissingFlexController, init, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions
-
Constructor Details
-
CmsJspXmlContentBean
public CmsJspXmlContentBean()Empty constructor, required for every JavaBean.- See Also:
-
CmsJspXmlContentBean
public CmsJspXmlContentBean(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Constructor, with parameters.- Parameters:
context
- the JSP page context objectreq
- the JSP requestres
- the JSP response- See Also:
-
-
Method Details
-
contentload
public I_CmsXmlContentContainer contentload(String collectorName, String collectorParam, boolean editable) throws javax.servlet.jsp.JspException Loads a set of
, same as using theI_CmsXmlDocument
<cms:contentload collector="***" param="***" editable="***" />
tag.The locale for accessing the content is read form the current OpenCms users request context.
- Parameters:
collectorName
- the collector name to usecollectorParam
- the parameters for the collectoreditable
- indicates if "direct edit" support is required (will insert additional HTML)- Returns:
- an XML content container loaded with the selected content
- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
contentload
public I_CmsXmlContentContainer contentload(String collectorName, String collectorParam, Locale locale, boolean editable) throws javax.servlet.jsp.JspException Loads a set of
, same as using theI_CmsXmlDocument
<cms:contentload collector="***" param="***" locale="***" editable="***" />
tag.- Parameters:
collectorName
- the collector name to usecollectorParam
- the parameters for the collectorlocale
- the locale to use to access the contenteditable
- indicates if "direct edit" support is required (will insert additional HTML)- Returns:
- an XML content container loaded with the selected content
- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
contentload
public I_CmsXmlContentContainer contentload(String collectorName, String collectorParam, String pageIndex, String pageSize, Locale locale, boolean editable) throws javax.servlet.jsp.JspException Loads a set of
, same as using theI_CmsXmlDocument
<cms:contentload collector="***" param="***" locale="***" editable="***" />
tag.- Parameters:
collectorName
- 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 use to access the contenteditable
- indicates if "direct edit" support is required (will insert additional HTML)- Returns:
- an XML content container loaded with the selected content
- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
contentloop
Enables looping over a list of element values in the given parent container, same as using the<cms:contentloop element="***" />
tag.- Parameters:
container
- the XML content container to read the content fromelement
- the element to loop over- Returns:
- an XML content container to be used to loop over the selected element values in the parent container
-
contentshow
Returns the currently looped content element String value from the given XML content container, same as using the<cms:contentshow />
tag.This is to be used with a container initialized by
, in this case the element name is already set by the content loop container.contentloop(I_CmsXmlContentContainer, String)
The locale for accessing the content is read form the current OpenCms users request context.
- Parameters:
container
- the XML content container to read the content from- Returns:
- the selected content element String value from the given XML content container
-
contentshow
Returns the selected content element String value from the given XML content container, same as using the<cms:contentshow element="***" />
tag.The locale for accessing the content is read form the current OpenCms users request context.
- Parameters:
container
- the XML content container to read the content fromelement
- the element to show- Returns:
- the selected content element String value from the given XML content container
-
contentshow
Returns the selected content element String value from the given XML content container, same as using the<cms:contentshow element="***" locale="***" />
tag.- Parameters:
container
- the XML content container to read the content fromelement
- the element to showlocale
- the locale to read the element from- Returns:
- the selected content element String value from the given XML content container
-