public class CmsJspTagInclude extends javax.servlet.jsp.tagext.BodyTagSupport implements I_CmsJspTagParamParent
<cms:include/>
tag,
used to include another OpenCms managed resource in a JSP.构造器和说明 |
---|
CmsJspTagInclude()
Empty constructor, required for attribute value initialization.
|
限定符和类型 | 方法和说明 |
---|---|
static void |
addParameter(java.util.Map<java.lang.String,java.lang.String[]> parameters,
java.lang.String name,
java.lang.String value,
boolean overwrite)
Adds parameters to a parameter Map that can be used for a http request.
|
void |
addParameter(java.lang.String name,
java.lang.String value)
This methods adds parameters to the current request.
|
int |
doEndTag() |
int |
doStartTag()
Returns
. |
java.lang.String |
getAttribute()
Returns the attribute.
|
java.lang.String |
getCacheable()
Returns the cacheable flag.
|
java.lang.String |
getEditable()
Returns the editable flag.
|
java.lang.String |
getElement()
Returns the element.
|
java.lang.String |
getFile()
Returns the value of
. |
java.lang.String |
getPage()
Returns the include page target.
|
java.lang.String |
getProperty()
Returns the property.
|
java.lang.String |
getSuffix()
Returns the suffix.
|
static void |
includeTagAction(javax.servlet.jsp.PageContext context,
java.lang.String target,
java.lang.String element,
boolean editable,
java.util.Map<java.lang.String,java.lang.String[]> paramMap,
java.util.Map<java.lang.String,java.lang.Object> attrMap,
javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
Includes the selected target.
|
static void |
includeTagAction(javax.servlet.jsp.PageContext context,
java.lang.String target,
java.lang.String element,
java.util.Locale locale,
boolean editable,
boolean cacheable,
java.util.Map<java.lang.String,java.lang.String[]> paramMap,
java.util.Map<java.lang.String,java.lang.Object> attrMap,
javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
Includes the selected target.
|
void |
release() |
void |
setAttribute(java.lang.String attribute)
Sets the attribute.
|
void |
setCacheable(java.lang.String cacheable)
Sets the cacheable flag.
|
void |
setEditable(java.lang.String editable)
Sets the editable flag.
|
void |
setElement(java.lang.String element)
Sets the element.
|
void |
setFile(java.lang.String file)
Sets the file, same as using
setPage() . |
void |
setPage(java.lang.String target)
Sets the include page target.
|
void |
setProperty(java.lang.String property)
Sets the property.
|
void |
setSuffix(java.lang.String suffix)
Sets the suffix.
|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
public CmsJspTagInclude()
public static void addParameter(java.util.Map<java.lang.String,java.lang.String[]> parameters, java.lang.String name, java.lang.String value, boolean overwrite)
parameters
- the Map to add the parameters toname
- the name to addvalue
- the value to addoverwrite
- if true
, a parameter in the map will be overwritten by
a parameter with the same name, otherwise the request will have multiple parameters
with the same name (which is possible in http requests)public static void includeTagAction(javax.servlet.jsp.PageContext context, java.lang.String target, java.lang.String element, boolean editable, java.util.Map<java.lang.String,java.lang.String[]> paramMap, java.util.Map<java.lang.String,java.lang.Object> attrMap, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws javax.servlet.jsp.JspException
context
- the current JSP page contexttarget
- the target for the include, might be null
element
- the element to select form the target might be null
editable
- flag to indicate if the target is editableparamMap
- a map of parameters for the include, will be merged with the request
parameters, might be null
attrMap
- a map of attributes for the include, will be merged with the request
attributes, might be null
req
- the current requestres
- the current responsejavax.servlet.jsp.JspException
- in case something goes wrongpublic static void includeTagAction(javax.servlet.jsp.PageContext context, java.lang.String target, java.lang.String element, java.util.Locale locale, boolean editable, boolean cacheable, java.util.Map<java.lang.String,java.lang.String[]> paramMap, java.util.Map<java.lang.String,java.lang.Object> attrMap, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws javax.servlet.jsp.JspException
context
- the current JSP page contexttarget
- the target for the include, might be null
element
- the element to select form the target, might be null
locale
- the locale to use for the selected element, might be null
editable
- flag to indicate if the target is editablecacheable
- flag to indicate if the target should be cacheable in the Flex cacheparamMap
- a map of parameters for the include, will be merged with the request
parameters, might be null
attrMap
- a map of attributes for the include, will be merged with the request
attributes, might be null
req
- the current requestres
- the current responsejavax.servlet.jsp.JspException
- in case something goes wrongpublic void addParameter(java.lang.String name, java.lang.String value)
Parameters added here will be treated like parameters from the HttpRequest on included pages.
Remember that the value for a parameter in a HttpRequest is a String array, not just a simple String. If a parameter added here does not already exist in the HttpRequest, it will be added. If a parameter exists, another value will be added to the array of values. If the value already exists for the parameter, nothing will be added, since a value can appear only once per parameter.
addParameter
在接口中 I_CmsJspTagParamParent
name
- the name to addvalue
- the value to addI_CmsJspTagParamParent.addParameter(String, String)
public int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
在接口中 javax.servlet.jsp.tagext.Tag
doEndTag
在类中 javax.servlet.jsp.tagext.BodyTagSupport
EVAL_PAGE
javax.servlet.jsp.JspException
- by interface defaultTag.doEndTag()
public int doStartTag()
BodyTag.EVAL_BODY_BUFFERED
.doStartTag
在接口中 javax.servlet.jsp.tagext.Tag
doStartTag
在类中 javax.servlet.jsp.tagext.BodyTagSupport
BodyTag.EVAL_BODY_BUFFERED
Tag.doStartTag()
public java.lang.String getAttribute()
public java.lang.String getCacheable()
public java.lang.String getEditable()
public java.lang.String getElement()
public java.lang.String getFile()
getPage()
.public java.lang.String getPage()
public java.lang.String getProperty()
public java.lang.String getSuffix()
public void release()
release
在接口中 javax.servlet.jsp.tagext.Tag
release
在类中 javax.servlet.jsp.tagext.BodyTagSupport
Tag.release()
public void setAttribute(java.lang.String attribute)
attribute
- the attribute to setpublic void setCacheable(java.lang.String cacheable)
Cachable is true
by default.
cacheable
- the flag to setpublic void setEditable(java.lang.String editable)
Editable is false
by default.
editable
- the flag to setpublic void setElement(java.lang.String element)
element
- the element to setpublic void setFile(java.lang.String file)
setPage()
.file
- the file to setsetPage(String)
public void setPage(java.lang.String target)
target
- the target to setpublic void setProperty(java.lang.String property)
property
- the property to setpublic void setSuffix(java.lang.String suffix)
suffix
- the suffix to set