Class CmsJspActionElement
- java.lang.Object
-
- org.opencms.jsp.CmsJspBean
-
- org.opencms.jsp.CmsJspActionElement
-
- Direct Known Subclasses:
CmsGwtActionElement
,CmsJspLoginBean
,CmsJspStatusBean
,CmsJspXmlContentBean
,CmsUgcActionElement
,CmsXmlSitemapActionElement
public class CmsJspActionElement extends CmsJspBean
Bean to be used in JSP scriptlet code that provides direct access to the functionality offered by the OpenCms taglib.By instantiating a bean of this type and accessing the methods provided by the instance, all functionality of the OpenCms JSP taglib can be easily used from within JSP scriptlet code.
Initialize this bean at the beginning of your JSP like this:
<jsp:useBean id="cms" class="org.opencms.jsp.CmsJspActionElement"> <% cms.init(pageContext, request, response); %> </jsp:useBean>
You can also access the current users
by usingCmsObject
.CmsJspBean.getCmsObject()
All exceptions that occur when calling any method of this class are caught and written to the log output only, so that a template still has a chance of working at least in some elements.
- Since:
- 6.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static CmsMessageContainer
NOT_INITIALIZED
Error message in case bean was not properly initialized.
-
Constructor Summary
Constructors Constructor Description CmsJspActionElement()
Empty constructor, required for every JavaBean.CmsJspActionElement(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
Constructor, with parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
editable(boolean isEditable)
Includes the direct edit scriptlet, same as using the<cms:editable />
tag.void
editable(boolean isEditable, java.lang.String filename)
Includes the direct edit scriptlet, same as using the<cms:editable file="..." />
tag.void
editable(java.lang.String provider, java.lang.String mode, java.lang.String filename)
Includes the direct edit scriptlet, same as using the<cms:editable provider="..." mode="..." file="..." />
tag.void
editableManualClose(boolean needsClose)
Insert the end HTML for the direct edit buttons in manual mode (if required).boolean
editableManualOpen()
Insert the start HTML for the direct edit buttons in manual mode.java.lang.String
getContent(java.lang.String target)
Returns the processed output of an OpenCms resource in a String.java.lang.String
getContent(java.lang.String target, java.lang.String element, java.util.Locale locale)
Returns the processed output of an element within an OpenCms resource.CmsMessages
getMessages(java.lang.String bundleName, java.lang.String language)
Generates an initialized instance ofCmsMessages
for convenient access to localized resource bundles.CmsMessages
getMessages(java.lang.String bundleName, java.lang.String language, java.lang.String defaultLanguage)
Generates an initialized instance ofCmsMessages
for convenient access to localized resource bundles.CmsMessages
getMessages(java.lang.String bundleName, java.lang.String language, java.lang.String country, java.lang.String variant, java.lang.String defaultLanguage)
Generates an initialized instance ofCmsMessages
for convenient access to localized resource bundles.CmsMessages
getMessages(java.lang.String bundleName, java.util.Locale locale)
Generates an initialized instance ofCmsMessages
for convenient access to localized resource bundles.CmsJspNavBuilder
getNavigation()
Returns an initializedCmsJspNavBuilder
instance.java.lang.String
getNavigationUri()
Returns the current uri for the navigation.java.lang.String
img(java.lang.String target, CmsImageScaler scaler, java.util.Map<java.lang.String,java.lang.String> attributes)
Returns the HTML for an<img src="..." />
tag that includes the given image scaling parameters.java.lang.String
img(java.lang.String target, CmsImageScaler scaler, java.util.Map<java.lang.String,java.lang.String> attributes, boolean partialTag)
Returns the HTML for an<img src="..." />
tag that includes the given image scaling parameters.void
include(java.lang.String target)
Include a sub-element without parameters from the OpenCms VFS, same as using the<cms:include file="***" />
tag.void
include(java.lang.String target, java.lang.String element)
Include a named sub-element without parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag.void
include(java.lang.String target, java.lang.String element, boolean editable)
Include a named sub-element without parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag.void
include(java.lang.String target, java.lang.String element, boolean editable, boolean cacheable, java.util.Map<java.lang.String,?> parameterMap)
Include a named sub-element with parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag with parameters in the tag body.void
include(java.lang.String target, java.lang.String element, boolean editable, java.util.Map<java.lang.String,?> parameterMap)
Include a named sub-element with parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag with parameters in the tag body.void
include(java.lang.String target, java.lang.String element, java.util.Map<java.lang.String,?> parameterMap)
Include a named sub-element with parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag with parameters in the tag body.void
includeSilent(java.lang.String target, java.lang.String element)
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as usinginclude(String, String, Map)
.void
includeSilent(java.lang.String target, java.lang.String element, boolean editable)
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as usinginclude(String, String, Map)
.void
includeSilent(java.lang.String target, java.lang.String element, boolean editable, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as usinginclude(String, String, Map)
.void
includeSilent(java.lang.String target, java.lang.String element, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as usinginclude(String, String, Map)
.java.lang.String
info(java.lang.String property)
Returns an OpenCms or JVM system info property value, same as using the<cms:info property="***" />
tag.java.lang.String
label(java.lang.String label)
Returns an OpenCms workplace label.java.lang.String
link(java.lang.String target)
Returns a link to a file in the OpenCms VFS that has been adjusted according to the web application path and the OpenCms static export rules.java.lang.String
link(java.lang.String target, java.lang.String baseUri)
Returns a link to a file in the OpenCms VFS that has been adjusted according to the web application path and the OpenCms static export rules.java.util.Map<java.lang.String,java.lang.String>
properties()
Returns all properties of the current file.java.util.Map<java.lang.String,java.lang.String>
properties(java.lang.String file)
Returns all properties of the selected file.java.lang.String
property(java.lang.String name)
Returns a selected file property value, same as using the<cms:property name="***" />
tag or callingproperty(String, String, String, boolean)
.java.lang.String
property(java.lang.String name, java.lang.String file)
Returns a selected file property value, same as using the<cms:property name="***" file="***" />
tag or callingproperty(String, String, String, boolean)
.java.lang.String
property(java.lang.String name, java.lang.String file, java.lang.String defaultValue)
Returns a selected file property value, same as using the<cms:property name="***" file="***" default="***" />
tag or callingproperty(String, String, String, boolean)
.java.lang.String
property(java.lang.String name, java.lang.String file, java.lang.String defaultValue, boolean escapeHtml)
Returns a selected file property value with optional HTML escaping, same as using the<cms:property name="***" file="***" default="***" />
tag.boolean
template(java.lang.String element)
Checks if a template part should be used or not, same as using the<cms:template element="***" />
tag.boolean
template(java.lang.String elementlist, boolean checkall)
Checks if a template part should be used or not, same as using the<cms:template ifexists="***" />
tag.boolean
template(java.lang.String element, java.lang.String elementlist, boolean checkall)
Checks if a template part should be used or not, same as using the<cms:template element="***" ifexists="***" />
tag.java.lang.String
toAbsolute(java.lang.String target)
Converts a relative URI in the OpenCms VFS to an absolute one based on the location of the currently processed OpenCms URI.java.lang.String
user(java.lang.String property)
Returns a selected user property, i.e.-
Methods inherited from class org.opencms.jsp.CmsJspBean
getCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, handleMissingFlexController, init, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions
-
-
-
-
Field Detail
-
NOT_INITIALIZED
public static final CmsMessageContainer NOT_INITIALIZED
Error message in case bean was not properly initialized.
-
-
Constructor Detail
-
CmsJspActionElement
public CmsJspActionElement()
Empty constructor, required for every JavaBean.
-
CmsJspActionElement
public CmsJspActionElement(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
-
-
Method Detail
-
editable
public void editable(boolean isEditable) throws javax.servlet.jsp.JspException
Includes the direct edit scriptlet, same as using the<cms:editable />
tag.The configured default direct edit provider is used.
- Parameters:
isEditable
- include scriptlet only if true- Throws:
javax.servlet.jsp.JspException
- if something goes wrong
-
editable
public void editable(boolean isEditable, java.lang.String filename) throws javax.servlet.jsp.JspException
Includes the direct edit scriptlet, same as using the<cms:editable file="..." />
tag.For backward compatibility, this always uses the JSP include based direct edit provider
.
- Parameters:
isEditable
- include scriptlet only if truefilename
- file with scriptlet code- Throws:
javax.servlet.jsp.JspException
- if something goes wrong
-
editable
public void editable(java.lang.String provider, java.lang.String mode, java.lang.String filename) throws javax.servlet.jsp.JspException
Includes the direct edit scriptlet, same as using the<cms:editable provider="..." mode="..." file="..." />
tag.- Parameters:
provider
- the direct edit provider class namemode
- the direct edit mode to usefilename
- file with scriptlet code (may benull
)- Throws:
javax.servlet.jsp.JspException
- if something goes wrong
-
editableManualClose
public void editableManualClose(boolean needsClose) throws javax.servlet.jsp.JspException
Insert the end HTML for the direct edit buttons in manual mode (if required).Same as closing the
</cms:editable
tag after opening one in manual mode.- Parameters:
needsClose
- result ofeditableManualOpen()
should be the value for this parameter- Throws:
javax.servlet.jsp.JspException
- if something goes wrong
-
editableManualOpen
public boolean editableManualOpen() throws javax.servlet.jsp.JspException
Insert the start HTML for the direct edit buttons in manual mode.Same as opening the
<cms:editable mode="manual">
tag.- Returns:
true
if HTML was inserted that needs to be closed- Throws:
javax.servlet.jsp.JspException
- if something goes wrong
-
getContent
public java.lang.String getContent(java.lang.String target)
Returns the processed output of an OpenCms resource in a String.- Parameters:
target
- the target to process- Returns:
- the processed output of an OpenCms resource in a String
-
getContent
public java.lang.String getContent(java.lang.String target, java.lang.String element, java.util.Locale locale)
Returns the processed output of an element within an OpenCms resource.- Parameters:
target
- the target to processelement
- name of the elementlocale
- locale of the element- Returns:
- the processed output
-
getMessages
public CmsMessages getMessages(java.lang.String bundleName, java.util.Locale locale)
Generates an initialized instance ofCmsMessages
for convenient access to localized resource bundles.- Parameters:
bundleName
- the name of the ResourceBundle to uselocale
- the locale to use for localization- Returns:
- CmsMessages a message bundle initialized with the provided values
-
getMessages
public CmsMessages getMessages(java.lang.String bundleName, java.lang.String language)
Generates an initialized instance ofCmsMessages
for convenient access to localized resource bundles.- Parameters:
bundleName
- the name of the ResourceBundle to uselanguage
- language identifier for the locale of the bundle- Returns:
- CmsMessages a message bundle initialized with the provided values
-
getMessages
public CmsMessages getMessages(java.lang.String bundleName, java.lang.String language, java.lang.String defaultLanguage)
Generates an initialized instance ofCmsMessages
for convenient access to localized resource bundles.- Parameters:
bundleName
- the name of the ResourceBundle to uselanguage
- language identifier for the locale of the bundledefaultLanguage
- default for the language, will be used if language is null or empty String "", and defaultLanguage is not null- Returns:
- CmsMessages a message bundle initialized with the provided values
-
getMessages
public CmsMessages getMessages(java.lang.String bundleName, java.lang.String language, java.lang.String country, java.lang.String variant, java.lang.String defaultLanguage)
Generates an initialized instance ofCmsMessages
for convenient access to localized resource bundles.- Parameters:
bundleName
- the name of the ResourceBundle to uselanguage
- language identifier for the locale of the bundlecountry
- 2 letter country code for the locale of the bundlevariant
- a vendor or browser-specific variant codedefaultLanguage
- default for the language, will be used if language is null or empty String "", and defaultLanguage is not null- Returns:
- CmsMessages a message bundle initialized with the provided values
- See Also:
ResourceBundle
,CmsMessages
-
getNavigation
public CmsJspNavBuilder getNavigation()
Returns an initializedCmsJspNavBuilder
instance.- Returns:
- an initialized navigation builder instance
- See Also:
CmsJspNavBuilder
-
getNavigationUri
public java.lang.String getNavigationUri()
Returns the current uri for the navigation.- Returns:
- the current uri for the navigation
-
img
public java.lang.String img(java.lang.String target, CmsImageScaler scaler, java.util.Map<java.lang.String,java.lang.String> attributes)
Returns the HTML for an<img src="..." />
tag that includes the given image scaling parameters.- Parameters:
target
- the target URI of the file in the OpenCms VFSscaler
- the image scaler to use for scaling the imageattributes
- a map of additional HTML attributes that are added to the output- Returns:
- the HTML for an
<img src>
tag that includes the given image scaling parameters
-
img
public java.lang.String img(java.lang.String target, CmsImageScaler scaler, java.util.Map<java.lang.String,java.lang.String> attributes, boolean partialTag)
Returns the HTML for an<img src="..." />
tag that includes the given image scaling parameters.- Parameters:
target
- the target URI of the file in the OpenCms VFSscaler
- the image scaler to use for scaling the imageattributes
- a map of additional HTML attributes that are added to the outputpartialTag
- iftrue
, the opening<img
and closing/>
is omitted- Returns:
- the HTML for an
<img src>
tag that includes the given image scaling parameters
-
include
public void include(java.lang.String target) throws javax.servlet.jsp.JspException
Include a sub-element without parameters from the OpenCms VFS, same as using the<cms:include file="***" />
tag.- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)- Throws:
javax.servlet.jsp.JspException
- in case there were problems including the target- See Also:
CmsJspTagInclude
-
include
public void include(java.lang.String target, java.lang.String element) throws javax.servlet.jsp.JspException
Include a named sub-element without parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag.- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the target- Throws:
javax.servlet.jsp.JspException
- in case there were problems including the target- See Also:
CmsJspTagInclude
-
include
public void include(java.lang.String target, java.lang.String element, boolean editable) throws javax.servlet.jsp.JspException
Include a named sub-element without parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag.- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the targeteditable
- flag to indicate if direct edit should be enabled for the element- Throws:
javax.servlet.jsp.JspException
- in case there were problems including the target- See Also:
CmsJspTagInclude
-
include
public void include(java.lang.String target, java.lang.String element, boolean editable, boolean cacheable, java.util.Map<java.lang.String,?> parameterMap) throws javax.servlet.jsp.JspException
Include a named sub-element with parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag with parameters in the tag body.The parameter map should be a map where the keys are Strings (the parameter names) and the values are of type String[]. However, as a convenience feature, in case you provide just a String for the parameter value, it will automatically be translated to a String[1].
The handling of the
element
parameter depends on the included file type. Most often it is used as template selector.Important: Exceptions that occur in the include process are NOT handled even if
CmsJspBean.setSupressingExceptions(boolean)
was set totrue
.- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the targeteditable
- flag to indicate if direct edit should be enabled for the elementcacheable
- flag to indicate if the target should be cacheable in the Flex cacheparameterMap
- a map of the request parameters- Throws:
javax.servlet.jsp.JspException
- in case there were problems including the target- See Also:
CmsJspTagInclude
-
include
public void include(java.lang.String target, java.lang.String element, boolean editable, java.util.Map<java.lang.String,?> parameterMap) throws javax.servlet.jsp.JspException
Include a named sub-element with parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag with parameters in the tag body.The parameter map should be a map where the keys are Strings (the parameter names) and the values are of type String[]. However, as a convenience feature, in case you provide just a String for the parameter value, it will automatically be translated to a String[1].
The handling of the
element
parameter depends on the included file type. Most often it is used as template selector.Important: Exceptions that occur in the include process are NOT handled even if
CmsJspBean.setSupressingExceptions(boolean)
was set totrue
.- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the targeteditable
- flag to indicate if direct edit should be enabled for the elementparameterMap
- a map of the request parameters- Throws:
javax.servlet.jsp.JspException
- in case there were problems including the target- See Also:
CmsJspTagInclude
-
include
public void include(java.lang.String target, java.lang.String element, java.util.Map<java.lang.String,?> parameterMap) throws javax.servlet.jsp.JspException
Include a named sub-element with parameters from the OpenCms VFS, same as using the<cms:include file="***" element="***" />
tag with parameters in the tag body.- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the targetparameterMap
- a map of the request parameters- Throws:
javax.servlet.jsp.JspException
- in case there were problems including the target- See Also:
CmsJspTagInclude
-
includeSilent
public void includeSilent(java.lang.String target, java.lang.String element)
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as usinginclude(String, String, Map)
.This is a convenience method that allows to include elements on a page without checking if they exist or not. If the target element does not exist, nothing is printed to the JSP output.
- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the target
-
includeSilent
public void includeSilent(java.lang.String target, java.lang.String element, boolean editable)
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as usinginclude(String, String, Map)
.This is a convenience method that allows to include elements on a page without checking if they exist or not. If the target element does not exist, nothing is printed to the JSP output.
- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the targeteditable
- flag to indicate if direct edit should be enabled for the element
-
includeSilent
public void includeSilent(java.lang.String target, java.lang.String element, boolean editable, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as usinginclude(String, String, Map)
.This is a convenience method that allows to include elements on a page without checking if they exist or not. If the target element does not exist, nothing is printed to the JSP output.
- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the targeteditable
- flag to indicate if direct edit should be enabled for the elementparameterMap
- a map of the request parameters
-
includeSilent
public void includeSilent(java.lang.String target, java.lang.String element, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as usinginclude(String, String, Map)
.This is a convenience method that allows to include elements on a page without checking if they exist or not. If the target element does not exist, nothing is printed to the JSP output.
- Parameters:
target
- the target URI of the file in the OpenCms VFS (can be relative or absolute)element
- the element (template selector) to display from the targetparameterMap
- a map of the request parameters
-
info
public java.lang.String info(java.lang.String property)
Returns an OpenCms or JVM system info property value, same as using the<cms:info property="***" />
tag.See the description of the class
CmsJspTagInfo
for a detailed list of available options for the property value.- Parameters:
property
- the property to look up- Returns:
- String the value of the system property
- See Also:
CmsJspTagInfo
-
label
public java.lang.String label(java.lang.String label)
Returns an OpenCms workplace label.You should consider using a standard
java.util.ResourceBundle
instead of the OpenCms workplace language files.- Parameters:
label
- the label to look up- Returns:
- label the value of the label
- See Also:
CmsJspTagLabel
-
link
public java.lang.String link(java.lang.String target)
Returns a link to a file in the OpenCms VFS that has been adjusted according to the web application path and the OpenCms static export rules.Please note that the target is always assumed to be in the OpenCms VFS, so you can't use this method for links external to OpenCms.
Relative links are converted to absolute links, using the current element URI as base.
This is the same as using the
<cms:link>***</cms:link>
tag.- Parameters:
target
- the URI in the OpenCms VFS to link to- Returns:
- the translated link
- See Also:
CmsJspTagLink
,link(String, String)
-
link
public java.lang.String link(java.lang.String target, java.lang.String baseUri)
Returns a link to a file in the OpenCms VFS that has been adjusted according to the web application path and the OpenCms static export rules.Please note that the target is always assumed to be in the OpenCms VFS, so you can't use this method for links external to OpenCms.
Relative links are converted to absolute links, using the current element URI as base.
This is the same as using the
<cms:link baseUri="..." >***</cms:link>
tag.- Parameters:
target
- the URI in the OpenCms VFS to link tobaseUri
- the optional alternative base URI- Returns:
- the translated link
- See Also:
CmsJspTagLink
,link(String)
-
properties
public java.util.Map<java.lang.String,java.lang.String> properties()
Returns all properties of the current file.- Returns:
- Map all properties of the current file
-
properties
public java.util.Map<java.lang.String,java.lang.String> properties(java.lang.String file)
Returns all properties of the selected file.Please see the description of the class
CmsJspTagProperty
for valid options of thefile
parameter.- Parameters:
file
- the file (or folder) to look at for the properties- Returns:
- Map all properties of the current file (and optional of the folders containing the file)
- See Also:
CmsJspTagProperty
-
property
public java.lang.String property(java.lang.String name)
Returns a selected file property value, same as using the<cms:property name="***" />
tag or callingproperty(String, String, String, boolean)
.- Parameters:
name
- the name of the property to look for- Returns:
- the value of the property found, or null if the property could not be found
- See Also:
property(String, String, String, boolean)
,CmsJspTagProperty
-
property
public java.lang.String property(java.lang.String name, java.lang.String file)
Returns a selected file property value, same as using the<cms:property name="***" file="***" />
tag or callingproperty(String, String, String, boolean)
.- Parameters:
name
- the name of the property to look forfile
- the file (or folder) to look at for the property- Returns:
- the value of the property found, or null if the property could not be found
- See Also:
property(String, String, String, boolean)
,CmsJspTagProperty
-
property
public java.lang.String property(java.lang.String name, java.lang.String file, java.lang.String defaultValue)
Returns a selected file property value, same as using the<cms:property name="***" file="***" default="***" />
tag or callingproperty(String, String, String, boolean)
.- Parameters:
name
- the name of the property to look forfile
- the file (or folder) to look at for the propertydefaultValue
- a default value in case the property was not found- Returns:
- the value of the property found, or the value of defaultValue if the property could not be found
- See Also:
property(String, String, String, boolean)
,CmsJspTagProperty
-
property
public java.lang.String property(java.lang.String name, java.lang.String file, java.lang.String defaultValue, boolean escapeHtml)
Returns a selected file property value with optional HTML escaping, same as using the<cms:property name="***" file="***" default="***" />
tag.Please see the description of the class
CmsJspTagProperty
for valid options of thefile
parameter.- Parameters:
name
- the name of the property to look forfile
- the file (or folder) to look at for the propertydefaultValue
- a default value in case the property was not foundescapeHtml
- iftrue
, special HTML characters in the return value are escaped with their number representations (e.g. & becomes &)- Returns:
- the value of the property found, or the value of defaultValue if the property could not be found
- See Also:
CmsJspTagProperty
-
template
public boolean template(java.lang.String element)
Checks if a template part should be used or not, same as using the<cms:template element="***" />
tag.- Parameters:
element
- the template element to check- Returns:
true
if the element is active,false
otherwise- See Also:
CmsJspTagUser
-
template
public boolean template(java.lang.String elementlist, boolean checkall)
Checks if a template part should be used or not, same as using the<cms:template ifexists="***" />
tag.- Parameters:
elementlist
- the list of elements to checkcheckall
-true
if all elements in the list should be checked- Returns:
true
if the elements available,false
otherwise- See Also:
CmsJspTagUser
-
template
public boolean template(java.lang.String element, java.lang.String elementlist, boolean checkall)
Checks if a template part should be used or not, same as using the<cms:template element="***" ifexists="***" />
tag.- Parameters:
element
- the template element to checkelementlist
- the list of elements to checkcheckall
-true
if all elements in the list should be checked- Returns:
true
if the element is active,false
otherwise- See Also:
CmsJspTagUser
-
toAbsolute
public java.lang.String toAbsolute(java.lang.String target)
Converts a relative URI in the OpenCms VFS to an absolute one based on the location of the currently processed OpenCms URI.- Parameters:
target
- the relative URI to convert- Returns:
- the target URI converted to an absolute one
-
user
public java.lang.String user(java.lang.String property)
Returns a selected user property, i.e. information about the currently logged in user, same as using the<cms:user property="***" />
tag.- Parameters:
property
- the user property to display, please see the tag documentation for valid options- Returns:
- the value of the selected user property
- See Also:
CmsJspTagUser
-
-