com.wewebu.ow.server.dmsdialogs
Class OwCreateObjectFormularDialog

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.dmsdialogs.OwCreateObjectFormularDialog
All Implemented Interfaces:
OwBaseView, OwJspConfigurable, OwUpdateTarget

public class OwCreateObjectFormularDialog
extends OwStandardDialog
implements OwJspConfigurable

Dialog to create new objects. Uses a JSP Form.

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.OwDialog
OwDialog.OwDialogListener
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwLayout
OwLayout.OwDispatchRegion
 
Field Summary
static int DIALOG_STATUS_FAILED
          status of this dialog: checkin failed
static int DIALOG_STATUS_NONE
          status of this dialog: nothing done yet
static int DIALOG_STATUS_OK
          status of this dialog: checkin successful
protected  int m_dialogStatus
          status of this dialog needed for historization
protected  OwObjectClass m_folderClass
          class to use for new folder
protected  OwObject m_folderObject
          selected object of record
protected  boolean m_fOpenObject
          open with new record
protected  OwObjectPropertyFormularView m_PropertyView
          the property view
protected  OwClientRefreshContext m_RefreshCtx
          refresh context for callback
protected  OwObjectSkeleton m_sceletonObject
          the new folder object
protected  String m_strJspPage
          URL of a form page to use
protected  String m_strObjectClass
          the initial class
protected  String m_strObjectClassParent
          parent object class from where the user can select, only useful if classes are structured in a tree
protected  Map m_ValuesMap
          a set of properties that should be set as default for the new object
 
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
OwCreateObjectFormularDialog(OwObject folderObject_p, String strClassName_p, String strObjectClassParent_p, boolean fOpenObject_p, OwJspFormConfigurator strJspFormConfig_p)
          create a record / folder create dialog
 
Method Summary
protected  String create()
          create the folder / record
 void detach()
          remove view and all subviews from context
 OwJspFormConfigurator getJspConfigurator()
          Get the associated OwJspFormConfigurator object.
 OwObject getNewObject()
          get the newly created object
 int getStatus()
          get the current status of this dialog
protected  void init()
          init the target after the context is set.
protected  void onRender(Writer w_p)
          overridden render the view
 void onUpdate(OwEventTarget caller_p, int iCode_p, Object param_p)
          called by the framework to update the view when OwDocument.Update was called NOTE: We can not use the onRender method to update, because we do not know the call order of onRender.
 void setJspConfigurator(OwJspFormConfigurator jspFormConfigurator_p)
          Set the associated OwJspFormConfigurator object.
 void setRefreshContext(OwClientRefreshContext pluginRefreshCtx_p)
          set a plugin refresh callback interface
 void setValues(Map properties_p)
          submit a set of values that should be set as default for the new object
 
Methods inherited from class com.wewebu.ow.server.app.OwStandardDialog
getInfoIcon, getTitle, hasHelpButton, isRegion, onClose, onHelp, renderCloseButton, renderHelpButton, renderRegion, setHelp, setInfoIcon, setTitle
 
Methods inherited from class com.wewebu.ow.server.ui.OwDialog
closeDialog, 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, 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_sceletonObject

protected OwObjectSkeleton m_sceletonObject
the new folder object


m_PropertyView

protected OwObjectPropertyFormularView m_PropertyView
the property view


m_folderObject

protected OwObject m_folderObject
selected object of record


m_strObjectClass

protected String m_strObjectClass
the initial class


m_strObjectClassParent

protected String m_strObjectClassParent
parent object class from where the user can select, only useful if classes are structured in a tree


m_folderClass

protected OwObjectClass m_folderClass
class to use for new folder


m_RefreshCtx

protected OwClientRefreshContext m_RefreshCtx
refresh context for callback


m_fOpenObject

protected boolean m_fOpenObject
open with new record


m_strJspPage

protected String m_strJspPage
URL of a form page to use


m_ValuesMap

protected Map m_ValuesMap
a set of properties that should be set as default for the new object


DIALOG_STATUS_NONE

public static final int DIALOG_STATUS_NONE
status of this dialog: nothing done yet

See Also:
Constant Field Values

DIALOG_STATUS_OK

public static final int DIALOG_STATUS_OK
status of this dialog: checkin successful

See Also:
Constant Field Values

DIALOG_STATUS_FAILED

public static final int DIALOG_STATUS_FAILED
status of this dialog: checkin failed

See Also:
Constant Field Values

m_dialogStatus

protected int m_dialogStatus
status of this dialog needed for historization

Constructor Detail

OwCreateObjectFormularDialog

public OwCreateObjectFormularDialog(OwObject folderObject_p,
                                    String strClassName_p,
                                    String strObjectClassParent_p,
                                    boolean fOpenObject_p,
                                    OwJspFormConfigurator strJspFormConfig_p)
create a record / folder create dialog

Parameters:
folderObject_p - OwObject parent folder to add to
strClassName_p - class name to use for new folder, null = let user select a class
strObjectClassParent_p - String parent class to let user browse
fOpenObject_p -
strJspFormConfig_p - URL of a form page to use
Method Detail

getStatus

public int getStatus()
get the current status of this dialog

Returns:
the status

setValues

public void setValues(Map properties_p)
submit a set of values that should be set as default for the new object

Parameters:
properties_p - Map of values keyed by parameter names to be set initially

init

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

Overrides:
init in class OwView
Throws:
Exception

detach

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

Overrides:
detach in class OwView

getNewObject

public OwObject getNewObject()
                      throws Exception
get the newly created object

Throws:
Exception

onUpdate

public void onUpdate(OwEventTarget caller_p,
                     int iCode_p,
                     Object param_p)
              throws Exception
called by the framework to update the view when OwDocument.Update was called NOTE: We can not use the onRender method to update, because we do not know the call order of onRender. onUpdate is always called before all onRender methods.

Specified by:
onUpdate in interface OwUpdateTarget
Overrides:
onUpdate in class OwView
Parameters:
caller_p - OwEventTarget target that called update
iCode_p - int optional reason code
param_p - Object optional parameter representing the refresh, depends on the value of iCode_p, can be null
Throws:
Exception

setRefreshContext

public void setRefreshContext(OwClientRefreshContext pluginRefreshCtx_p)
set a plugin refresh callback interface

Parameters:
pluginRefreshCtx_p - OwClientRefreshContext

create

protected String create()
                 throws Exception
create the folder / record

Returns:
String DMSID of new object
Throws:
Exception

onRender

protected void onRender(Writer w_p)
                 throws Exception
overridden render the view

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

getJspConfigurator

public OwJspFormConfigurator getJspConfigurator()
Description copied from interface: OwJspConfigurable
Get the associated OwJspFormConfigurator object. Can be null.

Specified by:
getJspConfigurator in interface OwJspConfigurable
Returns:
the associated OwJspFormConfigurator object or null.

setJspConfigurator

public void setJspConfigurator(OwJspFormConfigurator jspFormConfigurator_p)
Description copied from interface: OwJspConfigurable
Set the associated OwJspFormConfigurator object. Can be null.

Specified by:
setJspConfigurator in interface OwJspConfigurable


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.