com.jalios.jcms.workspace
Class TreeHelper

java.lang.Object
  extended by com.jalios.jcms.workspace.TreeHelper

public class TreeHelper
extends 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
Version:
$Revision: 34282 $
Author:
dissert

Nested Class Summary
static class TreeHelper.WSTreeMemo
          When displaying a WSTree, a WSTreeMemo object is created and placed as AjaxRequestAttribute with the key AJAXATTRIBUTEKEY_WSTREEMEMO.
 
Field Summary
static String AJAXATTRIBUTEKEY_WSTREEMEMO
          The key of the parent workspace in the request, as attribute or parameter.
static String REVISION
           
 
Constructor Summary
TreeHelper()
           
 
Method Summary
static void printWorkspacesTree(Workspace mbrWorkspace, boolean showGroups, String groupParamName, javax.servlet.jsp.JspWriter out, 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AJAXATTRIBUTEKEY_WSTREEMEMO

public static String AJAXATTRIBUTEKEY_WSTREEMEMO
The key of the parent workspace in the request, as attribute or parameter.


REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

TreeHelper

public TreeHelper()
Method Detail

printWorkspacesTree

public static void printWorkspacesTree(Workspace mbrWorkspace,
                                       boolean showGroups,
                                       String groupParamName,
                                       javax.servlet.jsp.JspWriter out,
                                       String userLang,
                                       JcmsJspContext context,
                                       Member loggedMember)
                                throws 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:
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 IOException
Throws:
IOException


Copyright © 2001-2010 Jalios SA. All Rights Reserved.