com.waveset.ui
Class HierarchicalTable

java.lang.Object
  extended bycom.waveset.ui.Table
      extended bycom.waveset.ui.HierarchicalTable

public abstract class HierarchicalTable
extends Table

An extension of the table class that has helpers for displaying organizations


Nested Class Summary
 class HierarchicalTable.HierContents
          Get the administrators and organizations to display (end up with folder and admin ArrayLists.
 
Nested classes inherited from class com.waveset.ui.Table
Table.ActionButton, Table.AppletCell, Table.Button, Table.Cell, Table.ColorTextCell, Table.Column, Table.CompoundCell, Table.DateCell, Table.GridCell, Table.GridSpanCell, Table.IconCell, Table.JavascriptButton, Table.JavascriptSelectButton, Table.LinkCell, Table.Row, Table.SelectButton, Table.SubmitCommandButton, Table.SubmitSelectButton, Table.TextCell
 
Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.ui.Table
_columns, _descendingSort, _headerLinks, _mc, _rows, _sortColumn, trace
 
Constructor Summary
HierarchicalTable()
           
 
Method Summary
 int addOrganizationRows(java.util.ArrayList folderResult, Table.Row[] rows, int rowOffset, int numColumns, java.lang.String linkURL)
          Add the organizations to the table.
 HierarchicalTable.HierContents getContents(javax.servlet.ServletRequest req, Session s, boolean getUsers, boolean getAdmins, javax.servlet.http.HttpSession httpsession)
           
 HierarchicalTable.HierContents getContents(javax.servlet.ServletRequest req, Session s, boolean getUsers, boolean getAdmins, javax.servlet.http.HttpSession httpsession, ObjectGroup currentOrg)
           
 ObjectGroup getCurrentOrganization(javax.servlet.ServletRequest req, Session s, javax.servlet.http.HttpSession httpsession)
          Get the current organization, either from a request parameter, or from the session.
 java.lang.String[] getPath(Session s, HierarchicalTable.HierContents content)
          Build the path up to the root.
 ObjectGroup[] getTopmostOrganizations(Session s)
           
 void HierarchicalTable()
          All the interesting constrution happens after setting property values and calling the generate() method.
 void setTablePath(javax.servlet.http.HttpServletResponse response, java.lang.String[] path, java.lang.String baseURL)
          Set an optional folder path for this table.
 
Methods inherited from class com.waveset.ui.Table
addMessageParams, addParameter, encodeURLParameter, generate, getAppletHTML, getButtonCount, getButtonHtml, getButtonHtml, getButtonName, getButtonValue, getCellHtml, getColumnCount, getColumnIndex, getColumnIsWrap, getColumnLabel, getColumnName, getColumnNameNoColon, getError, getHiddenFormData, getLinkColumn, getLinkURL, getMessage, getObjectName, getObjectNames, getPageInformation, getParameter, getPostURL, getRowCount, getRowHasCheckbox, getRowNeedsLink, getRowTypeName, getSelectValue, getSortColumn, getSortEnable, getSortOrder, getSortURL, getSortURLParams, getSubTitle, getTableName, getTableNameHTML, getTitle, getTopButtonCount, getTopButtonName, getTopButtonValue, getType, implementsToHTML, isGenerateLinks, isMultiSelect, setApplet, setButtons, setColumns, setError, setGenerateLinks, setHiddenFormData, setLinkColumn, setLinkURL, setMessage, setMultiSelect, setPageInformation, setPostURL, setRouteURLParams, setRowHasCheckbox, setRows, setRowTypeName, setSortColumn, setSortEnable, setSortOrder, setSortURL, setSortURLParams, setSubTitle, setTableName, setTitle, setTopButtons, setType, sort, Table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

HierarchicalTable

public HierarchicalTable()
Method Detail

HierarchicalTable

public void HierarchicalTable()
All the interesting constrution happens after setting property values and calling the generate() method.


getCurrentOrganization

public ObjectGroup getCurrentOrganization(javax.servlet.ServletRequest req,
                                          Session s,
                                          javax.servlet.http.HttpSession httpsession)
                                   throws WavesetException
Get the current organization, either from a request parameter, or from the session. Set the current organization on the session so that we can come back to this page after edits. Special case a parameter name of __root__, clearing the session parameter if any. This will force the code to ask the session for "top" which may be a fake group.

Throws:
WavesetException

getTopmostOrganizations

public ObjectGroup[] getTopmostOrganizations(Session s)
                                      throws WavesetException
Throws:
WavesetException

getContents

public HierarchicalTable.HierContents getContents(javax.servlet.ServletRequest req,
                                                  Session s,
                                                  boolean getUsers,
                                                  boolean getAdmins,
                                                  javax.servlet.http.HttpSession httpsession,
                                                  ObjectGroup currentOrg)
                                           throws WavesetException
Throws:
WavesetException

getContents

public HierarchicalTable.HierContents getContents(javax.servlet.ServletRequest req,
                                                  Session s,
                                                  boolean getUsers,
                                                  boolean getAdmins,
                                                  javax.servlet.http.HttpSession httpsession)
                                           throws WavesetException
Throws:
WavesetException

addOrganizationRows

public int addOrganizationRows(java.util.ArrayList folderResult,
                               Table.Row[] rows,
                               int rowOffset,
                               int numColumns,
                               java.lang.String linkURL)
Add the organizations to the table. Returns the number added.


getPath

public java.lang.String[] getPath(Session s,
                                  HierarchicalTable.HierContents content)
                           throws WavesetException
Build the path up to the root. Sounds simple, but depending on the user's priviliges, they may not get a root directory, or they may... If they do not have a "top", we add one.

Throws:
WavesetException

setTablePath

public void setTablePath(javax.servlet.http.HttpServletResponse response,
                         java.lang.String[] path,
                         java.lang.String baseURL)
Set an optional folder path for this table. This will normally be rendered with a cascading, indented set of folders at the top of the table. For the "Top" link, do not set the id= parameter. This will work because in absense of an id, the display will be top, and for "fake" tops, it will build one based on admin privileges.