public class CmsJspTagResourceLoad extends CmsJspScopedVarBodyTagSuport implements I_CmsResourceContainer
<cms:resourceload/>
tag,
used to access and display resource information from the VFS.限定符和类型 | 字段和说明 |
---|---|
protected CmsObject |
m_cms
The CmsObject for the current user.
|
protected java.lang.String |
m_collector
The name of the collector to use for list building.
|
protected java.lang.String |
m_collectorName
The name of the resource collector used.
|
protected java.lang.String |
m_collectorParam
The parameters of the resource collector uses.
|
protected java.util.List<CmsResource> |
m_collectorResult
The list of collected resource items.
|
protected CmsContentInfoBean |
m_contentInfoBean
The bean to store information required to make the result list browsable.
|
protected CmsFlexController |
m_controller
The FlexController for the current request.
|
protected java.lang.String |
m_pageIndex
The index of the current page that gets displayed.
|
protected java.lang.String |
m_pageNavLength
The number of page links in the Google-like page navigation.
|
protected java.lang.String |
m_pageSize
The size of a page to be displayed.
|
protected java.lang.String |
m_param
Parameter used for the collector.
|
protected boolean |
m_preload
Indicates if the collector results should be preloaded.
|
protected java.lang.String |
m_property
The (optional) property to extend the parameter with.
|
protected CmsResource |
m_resource
Reference to the last loaded resource element.
|
protected java.lang.String |
m_resourceName
The file name to load the current content value from.
|
构造器和说明 |
---|
CmsJspTagResourceLoad()
Empty constructor, required for JSP tags.
|
CmsJspTagResourceLoad(I_CmsResourceContainer container,
javax.servlet.jsp.PageContext context,
java.lang.String collectorName,
java.lang.String collectorParam)
Constructor used when using
resourceload from scriptlet code. |
CmsJspTagResourceLoad(I_CmsResourceContainer container,
javax.servlet.jsp.PageContext context,
java.lang.String collectorName,
java.lang.String collectorParam,
java.lang.String pageIndex,
java.lang.String pageSize)
Constructor used when using
resourceload from scriptlet code. |
限定符和类型 | 方法和说明 |
---|---|
int |
doAfterBody() |
int |
doEndTag() |
protected void |
doLoadNextResource()
Load the next resource from the initialized list of resources.
|
int |
doStartTag() |
java.lang.String |
getCollector()
Returns the collector.
|
java.lang.String |
getCollectorName()
Returns the name of the currently used resource collector.
|
java.lang.String |
getCollectorParam()
Returns the parameters of the currently used resource collector.
|
java.util.List<CmsResource> |
getCollectorResult()
Returns the list of all currently loaded resources (instances of
). |
protected CmsContentInfoBean |
getContentInfoBean()
Returns the content info bean.
|
protected CmsResource |
getNextResource()
Returns the next resource from the collector.
|
java.lang.String |
getPageIndex()
Returns the index of the page to be displayed.
|
java.lang.String |
getPageNavLength()
Returns the number of page links in the Google-like page navigation.
|
java.lang.String |
getPageSize()
Returns the size of a single page to be displayed.
|
java.lang.String |
getParam()
Returns the collector parameter.
|
java.lang.String |
getPreload()
Returns
"true" if this content load tag should only preload the values from the collector. |
java.lang.String |
getProperty()
Returns the property.
|
CmsResource |
getResource()
Returns the currently loaded resource.
|
java.lang.String |
getResourceName()
Returns the resource name in the VFS for the currently loaded resource.
|
protected static java.lang.String |
getResourceName(CmsObject cms,
I_CmsResourceContainer contentContainer)
Returns the resource name currently processed.
|
boolean |
hasMoreContent()
已过时。
|
boolean |
hasMoreResources()
Resource iteration method to be used by JSP scriptlet code.
|
protected void |
init(I_CmsResourceContainer container)
Initializes this content load tag.
|
boolean |
isPreloader()
Returns
true if this container is used as a resource preloader. |
protected static java.util.List<CmsResource> |
limitCollectorResult(CmsContentInfoBean contentInfoBean,
java.util.List<CmsResource> collectorResult)
Limits the collector's result list to the size of a page to be displayed in a JSP.
|
void |
release() |
void |
setCollector(java.lang.String collector)
Sets the collector name.
|
void |
setPageIndex(java.lang.String pageIndex)
Sets the index of the page to be displayed.
|
void |
setPageNavLength(java.lang.String pageNavLength)
Sets the number of page links in the Google-like page navigation.
|
void |
setPageSize(java.lang.String pageSize)
Sets the size of a single page to be displayed.
|
void |
setParam(java.lang.String param)
Sets the collector parameter.
|
void |
setPreload(java.lang.String preload)
Sets the preload flag for this resource load tag.
|
void |
setProperty(java.lang.String property)
Sets the property.
|
getScope, getScopeAsInt, getScopeAsString, getScopeInt, getVar, isScopeVarSet, setScope, setVar, storeAttribute, storeAttribute
doInitBody, getBodyContent, getPreviousOut, setBodyContent
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
protected transient CmsObject m_cms
protected java.lang.String m_collector
protected java.lang.String m_collectorName
protected java.lang.String m_collectorParam
protected java.util.List<CmsResource> m_collectorResult
protected CmsContentInfoBean m_contentInfoBean
protected CmsFlexController m_controller
protected java.lang.String m_pageIndex
protected java.lang.String m_pageNavLength
protected java.lang.String m_pageSize
protected java.lang.String m_param
protected boolean m_preload
protected java.lang.String m_property
protected transient CmsResource m_resource
protected java.lang.String m_resourceName
public CmsJspTagResourceLoad()
public CmsJspTagResourceLoad(I_CmsResourceContainer container, javax.servlet.jsp.PageContext context, java.lang.String collectorName, java.lang.String collectorParam) throws javax.servlet.jsp.JspException
resourceload
from scriptlet code.container
- the parent resource container (could be a preloader)context
- the JSP page contextcollectorName
- the collector name to usecollectorParam
- the collector param to usejavax.servlet.jsp.JspException
- in case something goes wrongpublic CmsJspTagResourceLoad(I_CmsResourceContainer container, javax.servlet.jsp.PageContext context, java.lang.String collectorName, java.lang.String collectorParam, java.lang.String pageIndex, java.lang.String pageSize) throws javax.servlet.jsp.JspException
resourceload
from scriptlet code.container
- the parent resource 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)javax.servlet.jsp.JspException
- in case something goes wrongprotected static java.lang.String getResourceName(CmsObject cms, I_CmsResourceContainer contentContainer)
cms
- the current OpenCms user contextcontentContainer
- the current resource containerprotected static java.util.List<CmsResource> limitCollectorResult(CmsContentInfoBean contentInfoBean, java.util.List<CmsResource> collectorResult)
contentInfoBean
- the info bean of the collectorcollectorResult
- the result list of the collectorpublic int doAfterBody() throws javax.servlet.jsp.JspException
doAfterBody
在接口中 javax.servlet.jsp.tagext.IterationTag
doAfterBody
在类中 javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
BodyTagSupport.doAfterBody()
public int doEndTag()
doEndTag
在接口中 javax.servlet.jsp.tagext.Tag
doEndTag
在类中 javax.servlet.jsp.tagext.BodyTagSupport
Tag.doEndTag()
public int doStartTag() throws javax.servlet.jsp.JspException, CmsIllegalArgumentException
doStartTag
在接口中 javax.servlet.jsp.tagext.Tag
doStartTag
在类中 javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
CmsIllegalArgumentException
Tag.doStartTag()
public java.lang.String getCollector()
public java.lang.String getCollectorName()
I_CmsResourceContainer
getCollectorName
在接口中 I_CmsResourceContainer
I_CmsResourceContainer.getCollectorName()
public java.lang.String getCollectorParam()
I_CmsResourceContainer
getCollectorParam
在接口中 I_CmsResourceContainer
I_CmsResourceContainer.getCollectorParam()
public java.util.List<CmsResource> getCollectorResult()
I_CmsResourceContainer
CmsResource
).getCollectorResult
在接口中 I_CmsResourceContainer
I_CmsResourceContainer.getCollectorResult()
public java.lang.String getPageIndex()
public java.lang.String getPageNavLength()
public java.lang.String getPageSize()
public java.lang.String getParam()
public java.lang.String getPreload()
"true"
if this content load tag should only preload the values from the collector."true"
if this content load tag should only preload the values from the collectorpublic java.lang.String getProperty()
public CmsResource getResource()
I_CmsResourceContainer
getResource
在接口中 I_CmsResourceContainer
I_CmsResourceContainer.getResource()
public java.lang.String getResourceName()
I_CmsResourceContainer
getResourceName
在接口中 I_CmsResourceContainer
I_CmsResourceContainer.getResourceName()
@Deprecated public boolean hasMoreContent() throws javax.servlet.jsp.JspException
I_CmsResourceContainer
Calling this method will insert "direct edit" HTML to the output page (if required).
hasMoreContent
在接口中 I_CmsResourceContainer
true
if more resources are to be iteratedjavax.servlet.jsp.JspException
- in case something goes wrongI_CmsResourceContainer.hasMoreContent()
public boolean hasMoreResources() throws javax.servlet.jsp.JspException
I_CmsResourceContainer
Calling this method will insert "direct edit" HTML to the output page (if required).
hasMoreResources
在接口中 I_CmsResourceContainer
true
if more resources are to be iteratedjavax.servlet.jsp.JspException
- in case something goes wrongI_CmsResourceContainer.hasMoreResources()
public boolean isPreloader()
I_CmsResourceContainer
true
if this container is used as a resource preloader.A resource preloader is used to load resources without looping through it.
isPreloader
在接口中 I_CmsResourceContainer
true
if this container is used as a resource preloaderI_CmsResourceContainer.isPreloader()
public void release()
release
在接口中 javax.servlet.jsp.tagext.Tag
release
在类中 CmsJspScopedVarBodyTagSuport
Tag.release()
public void setCollector(java.lang.String collector)
collector
- the collector name to setpublic void setPageIndex(java.lang.String pageIndex)
pageIndex
- the index of the page to be displayedpublic void setPageNavLength(java.lang.String pageNavLength)
pageNavLength
- the number of page links in the Google-like page navigationpublic void setPageSize(java.lang.String pageSize)
pageSize
- the size of a single page to be displayedpublic void setParam(java.lang.String param)
param
- the collector parameter to setpublic void setPreload(java.lang.String preload)
If this is set to true
, then the collector result will only
be preloaded, but not iterated.
preload
- the preload flag to setpublic void setProperty(java.lang.String property)
property
- the property to setprotected void doLoadNextResource()
protected CmsContentInfoBean getContentInfoBean()
protected CmsResource getNextResource()
protected void init(I_CmsResourceContainer container) throws javax.servlet.jsp.JspException
container
- the parent container (could be a preloader)javax.servlet.jsp.JspException
- in case something goes wrong