|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opencms.jsp.CmsJspBean
org.opencms.jsp.CmsJspActionElement
org.opencms.frontend.templateone.CmsTemplateBase
org.opencms.frontend.templateone.modules.CmsTemplateModules
public class CmsTemplateModules
A helper bean for the template one modules.
Provides methods to create list views with category browsing and convenience methods to display date values and links.
| Field Summary | |
|---|---|
static java.lang.String |
PARAM_CATEGORYFOLDER
Request parameter name for the category folder. |
static java.lang.String |
PARAM_COLLECTOR
Request parameter name for the collector. |
static java.lang.String |
PARAM_COUNT
Request parameter name for the list count. |
static java.lang.String |
PARAM_ELEMENTCOUNT
Request parameter name maximum number of elements to show. |
static java.lang.String |
PARAM_FOLDER
Request parameter name for the xmlcontent folder. |
| Fields inherited from class org.opencms.frontend.templateone.CmsTemplateBase |
|---|
ATTRIBUTE_ORIGINAL_URI |
| Fields inherited from class org.opencms.jsp.CmsJspActionElement |
|---|
NOT_INITIALIZED |
| Constructor Summary | |
|---|---|
CmsTemplateModules(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
|
|
| Method Summary | |
|---|---|
java.lang.String |
buildHtmlNavBreadcrumb(java.lang.String separator)
Creates a html breadcrumb navigation. |
java.lang.String |
buildHtmlNavList(int resourceTypeId,
java.lang.String attrs)
Creates a html <li> list of all folders inside the current folder. |
java.lang.String |
buildHtmlNavList(java.lang.String resourceTypeName,
java.lang.String attrs)
Creates a html <li> list of all folders inside the current folder. |
java.lang.String |
getAnchor(java.lang.String hrefAttrib,
java.lang.String descrAttrib,
java.lang.String targetAttrib)
Creates a HTML anchor from the values of three page context attribute names. |
java.lang.String |
getCategoryFolder()
Returns the URI of the currently displayed category folder. |
int |
getResourceCount(java.lang.String foldername,
int resourceTypeId)
Returns the number of resources with a given resource type inside a folder. |
int |
getResourceCount(java.lang.String foldername,
java.lang.String resourceTypeName)
Returns the number of resources with a given resource type inside a folder. |
boolean |
hasCategoryFolders()
Returns true if the currently displayed folder contains subfolders which are used as category folders. |
boolean |
isSameDate(java.lang.String startDateAttrib,
java.lang.String endDateAttrib)
Checks if two dates in the page context attributes have the same date and differ only from their time. |
void |
setDate(java.lang.String dateAttrib)
Saves a Date object in the page context that was created from the value of
a specified page context attribute. |
boolean |
showNavBreadCrumb()
Returns true if the bread crumb navigation should be shown. |
| Methods inherited from class org.opencms.frontend.templateone.CmsTemplateBase |
|---|
getOriginalUri, initUri, isUriChanged |
| 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, init, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PARAM_CATEGORYFOLDER
public static final java.lang.String PARAM_COLLECTOR
public static final java.lang.String PARAM_COUNT
public static final java.lang.String PARAM_ELEMENTCOUNT
public static final java.lang.String PARAM_FOLDER
| Constructor Detail |
|---|
public CmsTemplateModules(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
CmsJspActionElement.CmsJspActionElement(PageContext, HttpServletRequest, HttpServletResponse)| Method Detail |
|---|
public java.lang.String buildHtmlNavBreadcrumb(java.lang.String separator)
Instead of the NavText properties the title properties are used as anchor texts in this breadcrumb navigation! The navigation starts from a folder as specified in the request parameter "folder" and goes to the folder specified in the request parameter "categoryfolder".
separator - a String to separate the anchors in the breadcrumb navigation
public java.lang.String buildHtmlNavList(int resourceTypeId,
java.lang.String attrs)
throws org.opencms.main.CmsException
Additionally, behind each folder the number of resources of a specified resource type gets listed.
resourceTypeId - the resource type to count resources inside foldersattrs - optional html attributes to use in the <ul> tag
org.opencms.main.CmsException - if something goes wrong
public java.lang.String buildHtmlNavList(java.lang.String resourceTypeName,
java.lang.String attrs)
throws org.opencms.main.CmsException
Additionally, behind each folder the number of resources of a specified resource type gets listed.
resourceTypeName - the resource type name to count resources inside foldersattrs - optional html attributes to use in the <ul> tag
org.opencms.main.CmsException - if something goes wrong
public java.lang.String getAnchor(java.lang.String hrefAttrib,
java.lang.String descrAttrib,
java.lang.String targetAttrib)
hrefAttrib - the name of the page context attribute containing the link URLdescrAttrib - the name of the page context attribute containing the link descriptiontargetAttrib - the name of the page context attribute containing the link target
public java.lang.String getCategoryFolder()
public int getResourceCount(java.lang.String foldername,
int resourceTypeId)
foldername - the folder to read resourcesresourceTypeId - the desired resource type ID
public int getResourceCount(java.lang.String foldername,
java.lang.String resourceTypeName)
foldername - the folder to read resourcesresourceTypeName - the desired resource type name
public boolean hasCategoryFolders()
This method has to be called after the method buildHtmlNavList(int, String).
public boolean isSameDate(java.lang.String startDateAttrib,
java.lang.String endDateAttrib)
startDateAttrib - the name of the page context attribute containing the start date stringendDateAttrib - the name of the page context attribute containing the end date string
public void setDate(java.lang.String dateAttrib)
Date object in the page context that was created from the value of
a specified page context attribute.
dateAttrib - the name of the page context attribute containing the date stringpublic boolean showNavBreadCrumb()
This method has to be called after the method buildHtmlNavList(int, String).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||