Package com.jalios.jcms.workspace
Class TreeHelper
- java.lang.Object
-
- com.jalios.jcms.workspace.TreeHelper
-
public class TreeHelper extends java.lang.Object
Convenient class to construct complex UI tree of workspaces and groups. This class gives two set of static methods : - the first one to manage the hierarchy of workspaces; - the second to produce the HTML that make a hierarchy presentation of workspaces, with possibly, the groups in there. The structure in the DOM of the tree with workspaces and groups is as follows : for the top : div#wshierarchy.wsnode => div.wscontent : always open => div#globalgroupset.groupset -> class 'open' is added when clicked on div#globalgroupset_title => div#globalgroupset_title : title for COMMON groups (WITHOUT any WS), only if groups are required => ul.wsgroupset : list of groups without WS, only if groups are required => ul.wstree : sub wsnodes for root WS (according to the loggedMember). => div#allwsgroupset.groupset -> class 'open' is added when clicked on div#allwsgroupset_title => div#allwsgroupset_title : title for WORKSPACE groups (with a WS), only if groups are required => ul.wstree : sub wsnodes for root WS (according to the loggedMember). for a workspace node : li.wsnode => div.ajax-refresh-div => a.ajax-refesh => span.wstitle : for the WS title corresponding to a node => div.wscontent : section that has to be open or closed => div.groupset => => ul.wsgroupset : list of groups for that WS, only if groups are required => must be open only on demand => ul.wstree : sub wsnodes for sub WS. When nodes are opened (Workspaces or groups), their ids with prefix are set as classes of an hidden div of id 'hiddenDivForOpenNodes'. When a link is clicked, the javascript JCMS.treews.TreeHelper.addClassOpenGroup(link) add the value of the class in the queryString.- Since:
- jcms-7.0.0
- Author:
- dissert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TreeHelper.WSTreeMemo
When displaying a WSTree, a WSTreeMemo object is created and placed as AjaxRequestAttribute with the key AJAXATTRIBUTEKEY_WSTREEMEMO.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AJAXATTRIBUTEKEY_WSTREEMEMO
The key of the parent workspace in the request, as attribute or parameter.
-
Constructor Summary
Constructors Constructor Description TreeHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
printWorkspacesTree(Workspace mbrWorkspace, boolean showGroups, java.lang.String groupParamName, javax.servlet.jsp.JspWriter out, java.lang.String userLang, JcmsJspContext context, Member loggedMember)
Print a navigation tree for group split by workspaces (except if a workspace is provided).static void
printWSNodeContent(Workspace workspace, TreeHelper.WSTreeMemo treeMemo, JcmsJspContext context, javax.servlet.jsp.JspWriter out, boolean open)
-
-
-
Method Detail
-
printWorkspacesTree
public static void printWorkspacesTree(Workspace mbrWorkspace, boolean showGroups, java.lang.String groupParamName, javax.servlet.jsp.JspWriter out, java.lang.String userLang, JcmsJspContext context, Member loggedMember) throws java.io.IOException
Print a navigation tree for group split by workspaces (except if a workspace is provided).- Parameters:
mbrWorkspace
- the workspace.groupParamName
- the HTTP parameter used to filter on a given parent group.out
- the JSP output stream.userLang
- the user language.context
- the context.showGroups
-loggedMember
-- Throws:
java.io.IOException
- Since:
- jcms-7.0.0
-
printWSNodeContent
public static void printWSNodeContent(Workspace workspace, TreeHelper.WSTreeMemo treeMemo, JcmsJspContext context, javax.servlet.jsp.JspWriter out, boolean open) throws java.io.IOException
- Throws:
java.io.IOException
-
-