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

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.OwLayout
              extended by com.wewebu.ow.server.dmsdialogs.views.OwObjectClassView
All Implemented Interfaces:
OwBaseView, OwMultipanel, OwTreeView.OwTreeViewEventListner, OwUpdateTarget, EventListener

public class OwObjectClassView
extends OwLayout
implements OwTreeView.OwTreeViewEventListner, OwMultipanel

View Module to select the document class of a new document.

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
 class OwObjectClassView.OwObjectClassTreeViewViewWithStyle
          overwrite the object tree view to use own styles
static interface OwObjectClassView.OwObjectClassViewListner
           Event listener for select event.
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwLayout
OwLayout.OwDispatchRegion
 
Field Summary
protected  int m_iNextButtonIndex
          index of the next button in the menu
protected  OwObjectClassView.OwObjectClassViewListner m_listner
          event listener for select event
protected  OwSubMenuView m_MenuView
          Menu for buttons in the view
protected  OwObjectClassPreviewView m_ObjectClassPreview
          View to display the class description as Preview
protected  OwResource m_resource
          network resource to get the classes from
protected  String m_TreeItemStyle
          overwritten TreeItemStyle for the treeview or null to use default
protected  String m_TreeSelectedItemStyle
          overwritten TreeItemSelectedStyle for the treeview or null to use default
protected  OwObjectClassView.OwObjectClassTreeViewViewWithStyle m_TreeView
          tree view module to display the OwObject structure
static int MENU_REGION
          region of the tree view
static int PREVIEW_REGION
          region of the tree view
static int TREE_REGION
          region of the tree view
 
Fields inherited from class com.wewebu.ow.server.ui.OwLayout
m_Regions
 
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
OwObjectClassView(OwResource resource_p, int iObjectType_p)
          construct a doc class view to select document classes
OwObjectClassView(OwResource resource_p, int iObjectType_p, OwObjectClassSelectionCfg classSelectionCfg)
           
OwObjectClassView(OwResource resource_p, int iObjectType_p, String strParentObjectClass_p)
          Deprecated. this will be removed in the future. Please use OwObjectClassView(OwResource, int, OwObjectClassSelectionCfg) instead.
 
Method Summary
 String getFormName()
          get the form used for the edit fields
protected  OwLocation getLocation()
          The current location, containing the current resource.
Only initialized if setObjectClassProcessor(OwObjectClassProcessor) is called with non-null parameter.
protected  void init()
          init the target after the context is set.
 boolean isValidated()
          check if view has validated its data and the next view can be enabled
 void navigateToClass(OwObjectClass objectClass_p)
          navigates to the given class object NOTE: the tree must have been initialized with navigateClasses already.
 void onNext(javax.servlet.http.HttpServletRequest request_p, Object oReason_p)
          event called when user clicked Lock button in menu
protected  void onRender(Writer w_p)
          called when the view should create its HTML content to be displayed
 void onTreeViewNavigateFolder(OwTreeView.OwTreeViewNode node_p)
          event called when a user navigates through the tree (using plus minus icon), but does not open a folder
 void onTreeViewOpenFolder(OwTreeView.OwTreeViewNode node_p)
          event called when a user opens a folder to display its document contents overridden from OwObjectTreeView.OwObjectTreeViewEventListner
 void setEventListner(OwObjectClassView.OwObjectClassViewListner listner_p)
          set event listener
 void setItemStyle(String strStyle_p)
          set the style for the tree item
 void setNextActivateView(OwView nextView_p)
          set the view that is next to this view, displays a next button to activate
 void setObjectClassProcessor(OwObjectClassProcessor objectClassProcessor)
          set object class processor
 void setPrevActivateView(OwView prevView_p)
          set the view that is prev to this view, displays a prev button to activate
 void setSelectedItemStyle(String strStyle_p)
          set the style for the selected tree item
 
Methods inherited from class com.wewebu.ow.server.ui.OwLayout
addRegion, addView, addView, addViewReference, getIterator, getViewRegion, isRegion, isRegionMaximized, isRegionMinimized, isRegionNormal, renderNamedRegion, renderRegion
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, detach, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormTarget, getIcon, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, isFormTargetExternal, isNamedRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, 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_TreeItemStyle

protected String m_TreeItemStyle
overwritten TreeItemStyle for the treeview or null to use default


m_TreeSelectedItemStyle

protected String m_TreeSelectedItemStyle
overwritten TreeItemSelectedStyle for the treeview or null to use default


m_listner

protected OwObjectClassView.OwObjectClassViewListner m_listner
event listener for select event


m_MenuView

protected OwSubMenuView m_MenuView
Menu for buttons in the view


m_ObjectClassPreview

protected OwObjectClassPreviewView m_ObjectClassPreview
View to display the class description as Preview


TREE_REGION

public static final int TREE_REGION
region of the tree view

See Also:
Constant Field Values

MENU_REGION

public static final int MENU_REGION
region of the tree view

See Also:
Constant Field Values

PREVIEW_REGION

public static final int PREVIEW_REGION
region of the tree view

See Also:
Constant Field Values

m_iNextButtonIndex

protected int m_iNextButtonIndex
index of the next button in the menu


m_TreeView

protected OwObjectClassView.OwObjectClassTreeViewViewWithStyle m_TreeView
tree view module to display the OwObject structure


m_resource

protected OwResource m_resource
network resource to get the classes from

Constructor Detail

OwObjectClassView

public OwObjectClassView(OwResource resource_p,
                         int iObjectType_p,
                         String strParentObjectClass_p)
Deprecated. this will be removed in the future. Please use OwObjectClassView(OwResource, int, OwObjectClassSelectionCfg) instead.

construct a doc class view to select document classes

Parameters:
resource_p - the OwResource to get the classes from
iObjectType_p - int object to browse for
strParentObjectClass_p - String name of class to start from or null to start browsing from root

OwObjectClassView

public OwObjectClassView(OwResource resource_p,
                         int iObjectType_p,
                         OwObjectClassSelectionCfg classSelectionCfg)
Parameters:
resource_p -
iObjectType_p -
classSelectionCfg -
Since:
4.1.0.0

OwObjectClassView

public OwObjectClassView(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 - int object to browse for
Method Detail

setSelectedItemStyle

public void setSelectedItemStyle(String strStyle_p)
set the style for the selected tree item


setItemStyle

public void setItemStyle(String strStyle_p)
set the style for the tree item


setObjectClassProcessor

public void setObjectClassProcessor(OwObjectClassProcessor objectClassProcessor)
set object class processor

Parameters:
objectClassProcessor - OwObjectClassProcessor
Since:
4.1.1.0

getLocation

protected OwLocation getLocation()
The current location, containing the current resource.
Only initialized if setObjectClassProcessor(OwObjectClassProcessor) is called with non-null parameter.

Returns:
OwLocation or null
Since:
4.1.1.0

setEventListner

public void setEventListner(OwObjectClassView.OwObjectClassViewListner listner_p)
set event listener


getFormName

public String getFormName()
get the form used for the edit fields

Overrides:
getFormName in class OwView
Returns:
String form name

init

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

Overrides:
init in class OwView
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

onTreeViewNavigateFolder

public void onTreeViewNavigateFolder(OwTreeView.OwTreeViewNode node_p)
                              throws Exception
Description copied from interface: OwTreeView.OwTreeViewEventListner
event called when a user navigates through the tree (using plus minus icon), but does not open a folder

Specified by:
onTreeViewNavigateFolder in interface OwTreeView.OwTreeViewEventListner
Parameters:
node_p - the node which triggered the event - the node which is opened (+) or closed (-)
Throws:
Exception

onTreeViewOpenFolder

public void onTreeViewOpenFolder(OwTreeView.OwTreeViewNode node_p)
                          throws Exception
event called when a user opens a folder to display its document contents overridden from OwObjectTreeView.OwObjectTreeViewEventListner

Specified by:
onTreeViewOpenFolder in interface OwTreeView.OwTreeViewEventListner
Parameters:
node_p - the node which triggered the event - the opened folder node
Throws:
Exception

setNextActivateView

public void setNextActivateView(OwView nextView_p)
                         throws Exception
set the view that is next to this view, displays a next button to activate

Specified by:
setNextActivateView in interface OwMultipanel
Parameters:
nextView_p - OwView
Throws:
Exception

onNext

public void onNext(javax.servlet.http.HttpServletRequest request_p,
                   Object oReason_p)
            throws Exception
event called when user clicked Lock button in menu

Parameters:
oReason_p - Optional reason object submitted in addMenuItem
request_p - HttpServletRequest
Throws:
Exception

onRender

protected void onRender(Writer w_p)
                 throws Exception
called when the view should create its HTML content to be displayed

Overrides:
onRender in class OwView
Parameters:
w_p - Writer object to write HTML to
Throws:
Exception

isValidated

public boolean isValidated()
                    throws Exception
check if view has validated its data and the next view can be enabled

Specified by:
isValidated in interface OwMultipanel
Returns:
boolean true = can forward to next view, false = view has not yet validated
Throws:
Exception

setPrevActivateView

public void setPrevActivateView(OwView prevView_p)
                         throws Exception
set the view that is prev to this view, displays a prev button to activate

Specified by:
setPrevActivateView in interface OwMultipanel
Parameters:
prevView_p - OwView
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.