com.wewebu.ow.server.dmsdialogs.views
Class OwObjectClassTreeView

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.ui.OwView
          extended by com.wewebu.ow.server.ui.OwTreeView
              extended by com.wewebu.ow.server.dmsdialogs.views.OwObjectClassTreeView
All Implemented Interfaces:
OwBaseView, OwUpdateTarget
Direct Known Subclasses:
OwObjectClassView.OwObjectClassTreeViewViewWithStyle

public class OwObjectClassTreeView
extends OwTreeView

TreeView Module to display Tree Views of OwObjects.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Nested Class Summary
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwTreeView
OwTreeView.OwTreeViewEventListner, OwTreeView.OwTreeViewNode
 
Field Summary
protected  OwConfiguration m_Configuration
          application m_Configuration reference
protected  int m_iObjectType
          OwObject type to filter
protected  OwNetwork m_network
          credentials of the user
protected  OwResource m_resource
          network resource to get the classes from
 
Fields inherited from class com.wewebu.ow.server.ui.OwTreeView
childrenSort, DISPLAY_MODE_REGISTER_NODES, DISPLAY_MODE_TREE_NODES, m_eventlistner, m_focusNode, m_nodeMap, m_root, m_selectedNode, m_strDesignURL, m_strPath, NODE_ID_KEY, PATH_DELIMITER
 
Fields inherited from class com.wewebu.ow.server.ui.OwView
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget
 
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView
EMPTY_STRING
 
Constructor Summary
OwObjectClassTreeView(OwResource resource_p, int iObjectType_p)
          construct a doc class view to select document classes
OwObjectClassTreeView(OwResource resource_p, int iObjectType_p, OwObjectClassSelectionCfg classSelectionCfg)
           
 
Method Summary
protected  List createChildObjects(Object objectClass_p)
          create a list of child objects to the given object
protected  void expandParents(Object theObject_p)
          Expand the parents of the current object
protected  String getCloseIconURL(Object obj_p, OwTreeView.OwTreeViewNode node_p)
          get a URL to the close icon
protected  String getDisplayName(Object obj_p, OwTreeView.OwTreeViewNode node_p)
          get the display name for an object, default returns getName to be implemented by the derived class
protected  String getName(Object obj_p, OwTreeView.OwTreeViewNode node_p)
          get the name for an object, used to build paths
protected  String getOpenIconURL(Object obj_p, OwTreeView.OwTreeViewNode node_p)
          get a URL to the open icon to be implemented by the derived class
protected  boolean hasPlusMinusIcon(Object obj_p, OwTreeView.OwTreeViewNode node_p)
          (overridable) check of node has subnodes to be overwritten by the derived class
protected  void init()
          init the target after the context is set.
 boolean isEnabled(Object obj_p, OwTreeView.OwTreeViewNode node_p)
          check if node is enabled, i.e.
 void navigateClasses(Iterator classNames_p, String strSubFolderPath_p)
          set the folder object to display
 void navigateToClass(OwObjectClass objectClass_p)
          navigates to the given class object NOTE: the tree must have been initialized with navigateClasses already.
 
Methods inherited from class com.wewebu.ow.server.ui.OwTreeView
addNode, canNavigate, clearSelection, createTreeViewNode, getChildrenSort, getClientSideId, getCurrentNode, getDisplayHTML, getDisplayMode, getNodeForObject, getNodeFromID, getRegisterItemStyle, getSelectedRegisterItemStyle, getSelectedTreeItemStyle, getTreeItemStyle, isEmpty, isFocused, isSelected, navigate, navigate, navigateToChild, navigateToId, navigateUp, onClickLabel, onClickPlusMinus, onRender, openNode, refreshCurrentNode, refreshNodeForObject, renderFolderIconLink, renderMinusIconLink, renderNode, renderNodeLink, renderPlusIconLink, renderRegister, setChildrenSort, setDisplayMode, setEventListner, useFormEventUrls, writeTooltip
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, addView, detach, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, isFormTargetExternal, isNamedRegion, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, renderNamedRegion, renderRegion, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal, usesFormWithAttributes
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest, updateExternalFormTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Configuration

protected OwConfiguration m_Configuration
application m_Configuration reference


m_resource

protected OwResource m_resource
network resource to get the classes from


m_iObjectType

protected int m_iObjectType
OwObject type to filter


m_network

protected OwNetwork m_network
credentials of the user

Constructor Detail

OwObjectClassTreeView

public OwObjectClassTreeView(OwResource resource_p,
                             int iObjectType_p)
construct a doc class view to select document classes

Parameters:
resource_p - the OwResource to get the classes from
iObjectType_p - OwObject type to filter

OwObjectClassTreeView

public OwObjectClassTreeView(OwResource resource_p,
                             int iObjectType_p,
                             OwObjectClassSelectionCfg classSelectionCfg)
Parameters:
resource_p -
iObjectType_p -
classSelectionCfg -
Method Detail

init

protected void init()
             throws Exception
init the target after the context is set.

Overrides:
init in class OwTreeView
Throws:
Exception

navigateClasses

public void navigateClasses(Iterator classNames_p,
                            String strSubFolderPath_p)
                     throws Exception
set the folder object to display

Parameters:
classNames_p - Iterator
strSubFolderPath_p -
Throws:
Exception

navigateToClass

public void navigateToClass(OwObjectClass objectClass_p)
                     throws Exception
navigates to the given class object NOTE: the tree must have been initialized with navigateClasses already.

Parameters:
objectClass_p - OwObjectClass
Throws:
Exception

createChildObjects

protected List createChildObjects(Object objectClass_p)
                           throws Exception
create a list of child objects to the given object

Specified by:
createChildObjects in class OwTreeView
Parameters:
objectClass_p - Object which is managed by the tree view
Returns:
List of Objects which are child to the given object
Throws:
Exception

hasPlusMinusIcon

protected boolean hasPlusMinusIcon(Object obj_p,
                                   OwTreeView.OwTreeViewNode node_p)
                            throws Exception
(overridable) check of node has subnodes to be overwritten by the derived class

Overrides:
hasPlusMinusIcon in class OwTreeView
Parameters:
obj_p - Object which is managed by the tree view
Returns:
true if plus minus icon should be displayed to open subnodes
Throws:
Exception

isEnabled

public boolean isEnabled(Object obj_p,
                         OwTreeView.OwTreeViewNode node_p)
                  throws Exception
check if node is enabled, i.e. can open the folder to be implemented by the derived class

Overrides:
isEnabled in class OwTreeView
Parameters:
obj_p - Object which is managed by the tree view
Returns:
true = enabled, false = disabled
Throws:
Exception

getName

protected String getName(Object obj_p,
                         OwTreeView.OwTreeViewNode node_p)
                  throws Exception
get the name for an object, used to build paths

Specified by:
getName in class OwTreeView
Parameters:
obj_p - Object which is managed by the tree view
Returns:
the name for an object
Throws:
Exception

getDisplayName

protected String getDisplayName(Object obj_p,
                                OwTreeView.OwTreeViewNode node_p)
                         throws Exception
get the display name for an object, default returns getName to be implemented by the derived class

Overrides:
getDisplayName in class OwTreeView
Parameters:
obj_p - Object which is managed by the tree view
node_p - the node to return the text for
Returns:
the display name for an object
Throws:
Exception

getCloseIconURL

protected String getCloseIconURL(Object obj_p,
                                 OwTreeView.OwTreeViewNode node_p)
                          throws Exception
get a URL to the close icon

Overrides:
getCloseIconURL in class OwTreeView
Parameters:
obj_p - Object which is managed by the tree view
node_p - an OwTreeView.OwTreeViewNode
Returns:
String URL to the close icon
Throws:
Exception

getOpenIconURL

protected String getOpenIconURL(Object obj_p,
                                OwTreeView.OwTreeViewNode node_p)
                         throws Exception
get a URL to the open icon to be implemented by the derived class

Overrides:
getOpenIconURL in class OwTreeView
Parameters:
obj_p - Object which is managed by the tree view
node_p - OwTreeViewNode
Returns:
String URL to the close icon
Throws:
Exception

expandParents

protected void expandParents(Object theObject_p)
Description copied from class: OwTreeView
Expand the parents of the current object

Specified by:
expandParents in class OwTreeView


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.