com.wewebu.ow.server.plug.owdocprops
Class OwEditPropertiesDialogSimple

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.ui.OwDialog
                  extended by com.wewebu.ow.server.app.OwStandardDialog
                      extended by com.wewebu.ow.server.app.OwStandardSequenceDialog
                          extended by com.wewebu.ow.server.plug.owdocprops.OwEditPropertiesDialogSimple
All Implemented Interfaces:
com.wewebu.ow.server.app.OwSequenceView, com.wewebu.ow.server.ui.OwBaseView, com.wewebu.ow.server.ui.OwUpdateTarget

public class OwEditPropertiesDialogSimple
extends com.wewebu.ow.server.app.OwStandardSequenceDialog

Implementation of the simple Document edit properties Dialog. Just renders a given list of properties for editing.

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
protected static class OwEditPropertiesDialogSimple.OwSimpleObjectPropertyView
           OwSimpleObjectPropertyView.
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwDialog
com.wewebu.ow.server.ui.OwDialog.OwDialogListener
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwLayout
com.wewebu.ow.server.ui.OwLayout.OwDispatchRegion
 
Field Summary
protected  int m_iIndex
          current item index
protected  List m_items
          list of items to work on
protected  int m_iViewMask
          filters the views to be displayed
protected  com.wewebu.ow.server.app.OwMimeManager m_MimeManager
          instance of the MIME manager used to open the objects
protected  com.wewebu.ow.server.ecm.OwObject m_ParentObject
          the parent of the object that listed the getItem()
protected  Collection m_propertyInfos
          Collection of property infos
static int VIEW_MASK_AUTOOPEN
          mask value to use autoopen object
static int VIEW_MASK_DISABLE_MENU
          mask value for the properties view
static int VIEW_MASK_ENABLE_PASTE_METADATA
          mask value to enable paste metadata in property view
static int VIEW_MASK_PREVIEW_AUTOOPEN
          mask value to use preview mode for autoopen
 
Fields inherited from class com.wewebu.ow.server.app.OwStandardDialog
CLOSE_BTN_REGION, FOOTER_REGION, HELP_BTN_REGION, INFO_ICON_REGION, LEFT_REGION, m_strHelpPath, m_strInfoIconURL, m_strTitle, MAIN_REGION, MENU_REGION, RIGHT_REGION, STANDARD_DIALOG_REGION_MAX, TITLE_REGION
 
Fields inherited from class com.wewebu.ow.server.ui.OwDialog
m_iDEBUG_DocumentViewSize, m_iDEBUG_InitDocument, m_iDEBUG_TargetCount, m_Listener
 
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
OwEditPropertiesDialogSimple(Collection objects_p, int iIndex_p, com.wewebu.ow.server.ecm.OwObject parentObject_p, Collection propertyInfos_p)
          set the object, the edit properties view is working on
OwEditPropertiesDialogSimple(Collection objects_p, int iIndex_p, com.wewebu.ow.server.ecm.OwObject parentObject_p, Collection propertyInfos_p, boolean autolock_p)
          set the object, the edit properties view is working on
OwEditPropertiesDialogSimple(com.wewebu.ow.server.ecm.OwObject obj_p, com.wewebu.ow.server.ecm.OwObject parentObject_p, Collection propertyInfos_p)
          set the object, the edit properties view is working on
 
Method Summary
 void closeDialog()
          visually close the Dialog.
 void detach()
          remove view and all subviews from context
 int getCount()
          get the number of sequence items in the dialog
 com.wewebu.ow.server.ecm.OwObject getItem()
           
 com.wewebu.ow.server.app.OwMimeManager getMimeManager()
          get the MIME manager
 int getViewMask()
           
 boolean hasNext()
          called when the Dialog needs to know if there is a next item
 boolean hasPrev()
          called when the Dialog needs to know if there is a prev item
protected  boolean hasViewMask(int iViewMask_p)
          check if view should be displayed or is masked out
protected  void init()
          init the target after the context is set.
protected  void initNewItem()
          init the dialog with the current item
 void next(boolean fRemoveCurrent_p)
          move to next item and roll over, i.e.
 boolean onCancel(javax.servlet.http.HttpServletRequest request_p, Object oReason_p)
          event called when user clicked Cancel button in the menu of the property view
 void prev(boolean fRemoveCurrent_p)
          move to prev item and roll over, i.e.
 void renderRegion(Writer w_p, int iRegion_p)
          render the views of the region
 void setAutoLock(boolean autoLock_p)
          Set auto lock
 void setViewMask(int iViewMask_p)
          determine the views to be displayed by masking them with their flag
 
Methods inherited from class com.wewebu.ow.server.app.OwStandardSequenceDialog
onNext, onPrev, renderNavigationButtons
 
Methods inherited from class com.wewebu.ow.server.app.OwStandardDialog
getInfoIcon, getTitle, hasHelpButton, isRegion, onClose, onHelp, onRender, renderCloseButton, renderHelpButton, setHelp, setInfoIcon, setTitle
 
Methods inherited from class com.wewebu.ow.server.ui.OwDialog
setListener
 
Methods inherited from class com.wewebu.ow.server.ui.OwLayout
addRegion, addView, addView, addViewReference, getIterator, getViewRegion, isRegionMaximized, isRegionMinimized, isRegionNormal, renderNamedRegion
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, 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

VIEW_MASK_DISABLE_MENU

public static final int VIEW_MASK_DISABLE_MENU
mask value for the properties view

See Also:
Constant Field Values

VIEW_MASK_PREVIEW_AUTOOPEN

public static final int VIEW_MASK_PREVIEW_AUTOOPEN
mask value to use preview mode for autoopen

See Also:
Constant Field Values

VIEW_MASK_AUTOOPEN

public static final int VIEW_MASK_AUTOOPEN
mask value to use autoopen object

See Also:
Constant Field Values

VIEW_MASK_ENABLE_PASTE_METADATA

public static final int VIEW_MASK_ENABLE_PASTE_METADATA
mask value to enable paste metadata in property view

See Also:
Constant Field Values

m_iViewMask

protected int m_iViewMask
filters the views to be displayed


m_items

protected List m_items
list of items to work on


m_iIndex

protected int m_iIndex
current item index


m_ParentObject

protected com.wewebu.ow.server.ecm.OwObject m_ParentObject
the parent of the object that listed the getItem()


m_propertyInfos

protected Collection m_propertyInfos
Collection of property infos


m_MimeManager

protected com.wewebu.ow.server.app.OwMimeManager m_MimeManager
instance of the MIME manager used to open the objects

Constructor Detail

OwEditPropertiesDialogSimple

public OwEditPropertiesDialogSimple(com.wewebu.ow.server.ecm.OwObject obj_p,
                                    com.wewebu.ow.server.ecm.OwObject parentObject_p,
                                    Collection propertyInfos_p)
                             throws Exception
set the object, the edit properties view is working on

Parameters:
obj_p - OwObject
parentObject_p - the parent OwObject of the object that listed the getItem()
propertyInfos_p - Collection of property infos
Throws:
Exception

OwEditPropertiesDialogSimple

public OwEditPropertiesDialogSimple(Collection objects_p,
                                    int iIndex_p,
                                    com.wewebu.ow.server.ecm.OwObject parentObject_p,
                                    Collection propertyInfos_p)
                             throws Exception
set the object, the edit properties view is working on

Parameters:
objects_p - List of OwObject
iIndex_p - int index in objects_p to work on, usually 0
parentObject_p - the parent OwObject of the object that listed the getItem()
propertyInfos_p - Collection of property infos
Throws:
Exception

OwEditPropertiesDialogSimple

public OwEditPropertiesDialogSimple(Collection objects_p,
                                    int iIndex_p,
                                    com.wewebu.ow.server.ecm.OwObject parentObject_p,
                                    Collection propertyInfos_p,
                                    boolean autolock_p)
                             throws Exception
set the object, the edit properties view is working on

Parameters:
objects_p - List of OwObject
iIndex_p - int index in objects_p to work on, usually 0
parentObject_p - the parent OwObject of the object that listed the getItem()
propertyInfos_p - Collection of property infos
autolock_p - - autolock parameter
Throws:
Exception
Method Detail

setViewMask

public void setViewMask(int iViewMask_p)
determine the views to be displayed by masking them with their flag

Parameters:
iViewMask_p - bitmask according to VIEW_MASK_SYSTEM_... flags

getViewMask

public int getViewMask()

hasViewMask

protected boolean hasViewMask(int iViewMask_p)
check if view should be displayed or is masked out

Parameters:
iViewMask_p - bitmask according to VIEW_MASK_SYSTEM_... flags

init

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

Overrides:
init in class com.wewebu.ow.server.ui.OwView
Throws:
Exception

getItem

public com.wewebu.ow.server.ecm.OwObject getItem()
Returns:
OwObject

hasNext

public boolean hasNext()
                throws Exception
called when the Dialog needs to know if there is a next item

Specified by:
hasNext in interface com.wewebu.ow.server.app.OwSequenceView
Overrides:
hasNext in class com.wewebu.ow.server.app.OwStandardSequenceDialog
Throws:
Exception

hasPrev

public boolean hasPrev()
                throws Exception
called when the Dialog needs to know if there is a prev item

Specified by:
hasPrev in interface com.wewebu.ow.server.app.OwSequenceView
Overrides:
hasPrev in class com.wewebu.ow.server.app.OwStandardSequenceDialog
Throws:
Exception

getCount

public int getCount()
get the number of sequence items in the dialog


prev

public void prev(boolean fRemoveCurrent_p)
          throws Exception
move to prev item and roll over, i.e. start at the end one if first one is reached

Parameters:
fRemoveCurrent_p - true = remove the current sequence item and then move to the prev item, if this is the last item, closes the dialog
Throws:
Exception

next

public void next(boolean fRemoveCurrent_p)
          throws Exception
move to next item and roll over, i.e. start at the first one if end is reached

Parameters:
fRemoveCurrent_p - true = remove the current sequence item and then move to the next item, if this is the last item, closes the dialog
Throws:
Exception

initNewItem

protected void initNewItem()
                    throws Exception
init the dialog with the current item

Throws:
Exception

closeDialog

public void closeDialog()
                 throws Exception
visually close the Dialog. The behavior depends on usage If this view is a child of a DialogManager, the View gets removed from it.

Overrides:
closeDialog in class com.wewebu.ow.server.ui.OwDialog
Throws:
Exception

detach

public void detach()
remove view and all subviews from context

Overrides:
detach in class com.wewebu.ow.server.ui.OwView

onCancel

public boolean onCancel(javax.servlet.http.HttpServletRequest request_p,
                        Object oReason_p)
                 throws Exception
event called when user clicked Cancel button in the menu of the property view

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

setAutoLock

public void setAutoLock(boolean autoLock_p)
                 throws Exception
Set auto lock

Parameters:
autoLock_p - - autolock parameter.
Throws:
Exception
Since:
2.5.2.0

renderRegion

public void renderRegion(Writer w_p,
                         int iRegion_p)
                  throws Exception
render the views of the region

Specified by:
renderRegion in interface com.wewebu.ow.server.ui.OwBaseView
Overrides:
renderRegion in class com.wewebu.ow.server.app.OwStandardSequenceDialog
Parameters:
w_p - Writer object to write HTML to
iRegion_p - ID of the region to render
Throws:
Exception

getMimeManager

public com.wewebu.ow.server.app.OwMimeManager getMimeManager()
get the MIME manager

Returns:
OwMimeManager


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.