|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.jsp.util.CmsJspNavigationBean
public class CmsJspNavigationBean
Allows access to the OpenCms navigation information in combination with the
<cms:navigation>
tag.
CmsJspTagContentAccess
Nested Class Summary | |
---|---|
class |
CmsJspNavigationBean.CmsIsActiveTransformer
Provides a Map with Booleans that indicate if the given URI is the currently active element in the navigation. |
class |
CmsJspNavigationBean.CmsIsParentTransformer
Provides a Map with Booleans that indicate if the given navigation URI is a parent element of the current URI. |
Field Summary | |
---|---|
protected CmsJspNavBuilder |
m_builder
The navigation builder. |
protected CmsObject |
m_cms
The OpenCms user context. |
protected CmsJspNavElement |
m_current
The navigation element of the currently requested uri. |
protected int |
m_endLevel
The optional end level for the navigation. |
protected Map<String,Boolean> |
m_isActive
Indicates if a given navigation uri is currently active. |
protected Map<String,Boolean> |
m_isParent
Indicates if the given navigation URI is a parent element of the current URI. |
protected List<CmsJspNavElement> |
m_items
The result items from the navigation. |
protected String |
m_param
The optional parameter for the navigation. |
protected String |
m_resource
The optional resource for the navigation. |
protected int |
m_startLevel
The optional start level for the navigation. |
protected CmsJspTagNavigation.Type |
m_type
The selected navigation type. |
Constructor Summary | |
---|---|
CmsJspNavigationBean(CmsObject cms,
CmsJspTagNavigation.Type type,
int startLevel,
int endLevel,
String resource,
String param)
Base constructor. |
Method Summary | |
---|---|
CmsJspNavElement |
getCurrent()
Returns the navigation element of the currently requested uri. |
Map<String,Boolean> |
getIsActive()
Returns a lazy initialized Map that provides Booleans that indicate if a given navigation uri is currently active. |
Map<String,Boolean> |
getIsParent()
Returns a lazy initialized Map that provides Booleans that indicate if the given navigation URI is a parent element of the current URI. |
List<CmsJspNavElement> |
getItems()
Returns the list of selected navigation elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CmsJspNavBuilder m_builder
protected CmsObject m_cms
protected CmsJspNavElement m_current
protected int m_endLevel
protected Map<String,Boolean> m_isActive
protected Map<String,Boolean> m_isParent
protected List<CmsJspNavElement> m_items
protected String m_param
protected String m_resource
protected int m_startLevel
protected CmsJspTagNavigation.Type m_type
Constructor Detail |
---|
public CmsJspNavigationBean(CmsObject cms, CmsJspTagNavigation.Type type, int startLevel, int endLevel, String resource, String param)
cms
- the current users OpenCms context to build the navigation fortype
- the navigation type to generatestartLevel
- the optional start levelendLevel
- the optional end levelresource
- the optional resource for the navigationparam
- the optional parameter for the navigationMethod Detail |
---|
public CmsJspNavElement getCurrent()
public Map<String,Boolean> getIsActive()
The provided Map key is assumed to be a String that represents an absolute VFS path.
Usage example on a JSP with the JSTL:
<cms:navigation type="treeForFolder" startLevel="1" endLevel="3" var="nav" /> <c:forEach var="entry" items="${nav.items}" ... > ... <c:if test="${nav.isActive[entry.resourceName]}" > This is the currently active navigation entry </c:if> </c:forEach>
public Map<String,Boolean> getIsParent()
The provided Map key is assumed to be a String that represents an absolute VFS path.
Usage example on a JSP with the JSTL:
<cms:navigation type="treeForFolder" startLevel="1" endLevel="3" var="nav" /> <c:forEach var="entry" items="${nav.items}" ... > ... <c:if test="${nav.isParent[entry.resourceName]}" > The currently active navigation entry is a parent of the currently requested URI </c:if> </c:forEach>
public List<CmsJspNavElement> getItems()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |