public class CmsJspTagContainer
extends javax.servlet.jsp.tagext.TagSupport
限定符和类型 | 类和说明 |
---|---|
static class |
CmsJspTagContainer.JsonContainer
Json property name constants for containers.
|
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
DEFAULT_MAX_ELEMENTS
Default number of max elements in the container in case no value has been set.
|
static java.lang.String |
DETAIL_CONTAINERS_FOLDER_NAME
The detail containers folder name.
|
static java.lang.String |
DUMMY_ELEMENT
HTML used for invisible dummy elements.
|
static java.lang.String |
KEY_CONTAINER_DATA
Key used to write container data into the javascript window object.
|
构造器和说明 |
---|
CmsJspTagContainer() |
限定符和类型 | 方法和说明 |
---|---|
int |
doStartTag()
Internal action method.
|
protected static java.lang.String |
getContainerDataTag(CmsContainerBean container,
java.lang.String widthStr,
boolean isDetailView,
boolean isDetailOnly)
Creates a new data tag for the given container.
|
static java.lang.String |
getDetailOnlyPageName(java.lang.String detailContentSitePath)
Returns the site path to the detail only container page.
|
java.lang.String |
getDetailview()
Returns the boolean value if this container is target of detail views.
|
static java.util.List<CmsContainerElementBean> |
getGroupContainerElements(CmsObject cms,
CmsContainerElementBean element,
javax.servlet.ServletRequest req,
java.lang.String containerType)
Returns the element group elements.
|
static java.util.List<CmsContainerElementBean> |
getInheritedContainerElements(CmsObject cms,
CmsContainerElementBean element)
Reads elements from an inherited container.
|
java.lang.String |
getMaxElements()
Returns the maxElements attribute value.
|
java.lang.String |
getName()
Returns the name attribute value.
|
java.lang.String |
getTag()
Returns the tag attribute.
|
java.lang.String |
getTagClass()
Returns the tag class attribute.
|
protected static java.lang.String |
getTagClose(java.lang.String tagName)
Creates the closing tag for the container.
|
protected static java.lang.String |
getTagOpen(java.lang.String tagName,
java.lang.String containerName,
java.lang.String tagClass)
Creates the opening tag for the container assigning the appropriate id and class attributes.
|
java.lang.String |
getType()
Returns the type attribute value.
|
java.lang.String |
getWidth()
Returns the container width as a string.
|
protected void |
printElementWrapperTagEnd(boolean isOnline,
boolean isGroupcontainer)
Prints the closing tag for an element wrapper if in online mode.
|
protected void |
printElementWrapperTagStart(boolean isOnline,
CmsObject cms,
CmsContainerElementBean elementBean,
boolean isGroupContainer)
Prints the opening element wrapper tag for the container page editor if we are in Offline mode.
|
void |
release() |
void |
setDetailonly(java.lang.String detailOnly)
Sets if this container should only be displayed on detail pages.
|
void |
setDetailview(java.lang.String detailView)
Sets if the current container is target of detail views.
|
void |
setMaxElements(java.lang.String maxElements)
Sets the maxElements attribute value.
|
void |
setName(java.lang.String name)
Sets the name attribute value.
|
void |
setTag(java.lang.String tag)
Sets the tag attribute.
|
void |
setTagClass(java.lang.String tagClass)
Sets the tag class attribute.
|
void |
setType(java.lang.String type)
Sets the type attribute value.
|
void |
setWidth(java.lang.String width)
Sets the container width as a string.
|
public static final java.lang.String DEFAULT_MAX_ELEMENTS
public static final java.lang.String DETAIL_CONTAINERS_FOLDER_NAME
public static final java.lang.String DUMMY_ELEMENT
public static final java.lang.String KEY_CONTAINER_DATA
public static java.lang.String getDetailOnlyPageName(java.lang.String detailContentSitePath)
detailContentSitePath
- the detail content site pathpublic static java.util.List<CmsContainerElementBean> getGroupContainerElements(CmsObject cms, CmsContainerElementBean element, javax.servlet.ServletRequest req, java.lang.String containerType) throws CmsException
cms
- the current cms contextelement
- group elementreq
- the servlet requestcontainerType
- the container typeCmsException
- if something goes wrongpublic static java.util.List<CmsContainerElementBean> getInheritedContainerElements(CmsObject cms, CmsContainerElementBean element)
cms
- the current CMS contextelement
- the element which references the inherited containerprotected static java.lang.String getContainerDataTag(CmsContainerBean container, java.lang.String widthStr, boolean isDetailView, boolean isDetailOnly) throws JSONException
container
- the container to get the data tag forwidthStr
- the width of the container as a stringisDetailView
- true
if this container is currently being used for the detail viewisDetailOnly
- true
if this container is displayed in detail view onlyJSONException
- if there is a problem with JSON manipulationprotected static java.lang.String getTagClose(java.lang.String tagName)
tagName
- the tag nameprotected static java.lang.String getTagOpen(java.lang.String tagName, java.lang.String containerName, java.lang.String tagClass)
tagName
- the tag namecontainerName
- the container name used as id attribute valuetagClass
- the tag class attribute valuepublic int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
在接口中 javax.servlet.jsp.tagext.Tag
doStartTag
在类中 javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- in case something goes wrongTag.doStartTag()
public java.lang.String getDetailview()
true
or false
public java.lang.String getMaxElements()
public java.lang.String getName()
public java.lang.String getTag()
public java.lang.String getTagClass()
public java.lang.String getType()
If the container type has not been set, the name is substituted as type.
public java.lang.String getWidth()
public void release()
release
在接口中 javax.servlet.jsp.tagext.Tag
release
在类中 javax.servlet.jsp.tagext.TagSupport
Tag.release()
public void setDetailonly(java.lang.String detailOnly)
detailOnly
- if this container should only be displayed on detail pagespublic void setDetailview(java.lang.String detailView)
detailView
- true
or false
public void setMaxElements(java.lang.String maxElements)
maxElements
- the maxElements value to setpublic void setName(java.lang.String name)
name
- the name value to setpublic void setTag(java.lang.String tag)
tag
- the createTag to setpublic void setTagClass(java.lang.String tagClass)
tagClass
- the tag class attribute to setpublic void setType(java.lang.String type)
type
- the type value to setpublic void setWidth(java.lang.String width)
width
- the container width as a stringprotected void printElementWrapperTagEnd(boolean isOnline, boolean isGroupcontainer) throws java.io.IOException
isOnline
- if true, we are onlineisGroupcontainer
- true
if element is a group-containerjava.io.IOException
- if the output failsprotected void printElementWrapperTagStart(boolean isOnline, CmsObject cms, CmsContainerElementBean elementBean, boolean isGroupContainer) throws java.lang.Exception
isOnline
- true if we are in Online modecms
- the Cms contextelementBean
- the element beanisGroupContainer
- true if the element is a group-containerjava.lang.Exception
- if something goes wrong