|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.ow.server.ui.OwEventTarget
com.wewebu.ow.server.ui.OwView
com.wewebu.ow.server.ui.OwLayout
com.wewebu.ow.server.dmsdialogs.views.OwObjectPropertyView
public class OwObjectPropertyView
View Module to edit OwObject Properties.
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 | |
---|---|
static class |
OwObjectPropertyView.OwPropertyInfo
Combination of property name and read only. |
Nested classes/interfaces inherited from class com.wewebu.ow.server.ui.OwLayout |
---|
OwLayout.OwDispatchRegion |
Field Summary | |
---|---|
protected static String |
BATCH_INDEX_PROPERTIES_ATTRIBTUE_BAG_NAME
attribute bag name for the saved batch index properties stored in the document |
static int |
ERRORS_REGION
layout region definition for the error rendering |
static String |
GROUP_COLLAPSED_CLASS_NAME
UI class for collapsed group representation |
static String |
GROUP_EXPANDED_CLASS_NAME
UI class for expanded group representation |
protected Collection |
m_batchIndexProperties
contains the properties for batch-Import, set in owplugins.xml ==> |
protected OwBatchPropertiesHandler |
m_batchPropertiesHandler
batch index properties helper |
protected boolean |
m_enablesaveall
Flag to enable save all button option when more than one documents are selected. The save all button will be rendered if this m_saveAllActive is set to true ,
the m_enablesaveall is set to true and OwObjectPropertyView.m_fReadOnly
flag is false . |
protected boolean |
m_fAllPropertiesReadonly
flag indicating that all properties of object are read-only |
protected boolean |
m_fReadOnly
flag indicating if object can be edited |
protected boolean |
m_fSystem
flag indicating system properties. |
protected int |
m_iAppyBtnIndex
menu ID of the apply button |
protected int |
m_iLockIndex
menu ID of the lock button |
protected int |
m_iNextButtonIndex
menu ID of the next button |
protected int |
m_iUnLockIndex
menu ID of the unlock button |
protected int |
m_iViewMask
set of flags indicating the behavior of the view |
protected OwSubMenuView |
m_MenuView
Menu for buttons in the view |
protected OwObject |
m_ObjectRef
object reference the view is working on |
protected OwPasteMetadataHandler |
m_pasteMetadataHandler
paste metadata handler |
protected OwPropertyCollection |
m_Properties
properties from the object |
protected int |
m_ReadOnlyContext
context to be used for the read-only property |
protected Map |
m_readOnlyProperties
contains a map of properties to be rendered read only or null |
protected boolean |
m_saveAllActive
Flag that indicates the active status of the Save All button. The save all button will be rendered if this m_saveAllActive is set to true ,
the m_enablesaveall is set to true and OwObjectPropertyView.m_fReadOnly
flag is false . |
protected OwFieldManager |
m_theFieldManager
instance of the property field class |
static int |
MAIN_REGION
layout region definition for the main (property list) region |
static int |
MENU_REGION
layout region definition for the menu region |
static int |
MODES_REGION
layout region definition for the mode selection region |
protected static String |
QUERY_KEY_PROPNAME
query string for the property name |
static int |
VIEW_MASK_DISABLE_INTERNAL_MENU
flag to enable a internal menu and override getMenu() |
static int |
VIEW_MASK_ENABLE_PASTE_METADATA
flag to activate the paste metadata buttons |
static int |
VIEW_MASK_READONLY
flag to force read-only mode |
static int |
VIEW_MASK_RENDER_VERTICAL
flag to render vertical |
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.field.OwFieldProvider |
---|
TYPE_AJAX, TYPE_CHECKIN_OBJECT, TYPE_CREATE_OBJECT, TYPE_META_OBJECT, TYPE_RESULT_LIST, TYPE_SEARCH, TYPE_SMALL |
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView |
---|
EMPTY_STRING |
Constructor Summary | |
---|---|
OwObjectPropertyView()
|
Method Summary | |
---|---|
void |
clearBatchIndex()
clear stored batch index data |
protected OwBatchPropertiesHandler |
createBatchPropertiesHandler()
Creates the batch properties handler |
protected OwPasteMetadataHandler |
createPasteMetadataHandler()
Create a OwPasteMetadataHandler object |
void |
detach()
remove view and all subviews from context |
protected OwClipboard |
getClipboard()
Get current Clipboard, often used in this class. |
OwField |
getField(String strFieldClassName_p)
implementation for the OwFieldProvider interface |
OwFieldManager |
getFieldManager()
get a reference to the internal field manager |
String |
getFieldProviderName()
get a name that identifies the field provider, can be used to create IDs |
Object |
getFieldProviderSource()
get the source object that originally provided the fields. |
int |
getFieldProviderType()
implementation for the OwFieldProvider interface get the type of field provider as defined with TYPE_... |
Collection |
getFields()
get all the properties in the form |
protected OwPropertyCollection |
getFilteredClonedProperties()
|
OwMenuView |
getMenu()
(overridable) get the menu of the view you can add menu items or override to have your own menu for the view (see VIEW_MASK_DISABLE_INTERNAL_MENU) |
OwObject |
getObjectRef()
|
protected String |
getRowClassName(int iIndex_p,
OwProperty prop_p)
overridable get the style class name for the row |
Object |
getSafeFieldValue(String sName_p,
Object defaultvalue_p)
retrieve the value of a Field |
int |
getSaveBtnIndex()
Get save button id index |
boolean |
getUpdateStatus()
get the status after the last update |
protected boolean |
hasViewMask(int iViewMask_p)
check if a certain view property is enabled |
protected void |
informUserOnSuccess()
Post a message for informing user about a successfully save operation. |
protected void |
init()
init the target after the context is set. |
protected boolean |
isGroupWithErrors(OwGroupPropertiesConfiguration.OwPropertyGroup theGroup_p)
Check if the given properties group is with errors. |
boolean |
isReadOnly()
Check if this view displays properties in a read only manner. |
boolean |
isRegion(int region_p)
determine if region exists |
protected boolean |
isSupportLock()
overridable checks if lock should be supported |
boolean |
isSystemPropertyView()
|
boolean |
isValidated()
check if view has validated its data and the next view can be enabled |
Boolean |
mapProperties(Map map_p,
String name_p)
|
void |
onAjaxPropertyGroupCollapse(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
Method called when property group is collapsed using AJAX. |
boolean |
onApply(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
event called when user clicked Apply button in menu call getUpdateStatus() after save to check if fields are invalid |
protected boolean |
onApplyInternal(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
event called to safe changes call getUpdateStatus() after save to check if fields are invalid |
void |
onBatchIndex()
called by the client when the indexes should be set from the previous values as defined with setBatchProperties |
void |
onLock(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
event called when user clicked Lock button in menu |
void |
onNext(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
event called when user clicked Next button to switch to the next pane |
void |
onPasteAllMetaData(javax.servlet.http.HttpServletRequest request_p)
called when user presses the paste all metadata button |
void |
onPasteThisMetaData(javax.servlet.http.HttpServletRequest request_p)
called when user presses the paste this metadata button |
protected void |
onRender(Writer w_p)
called when the view should create its HTML content to be displayed |
void |
onUnLock(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
event called when user clicked UnLock button in menu |
void |
onUpdate(OwEventTarget caller_p,
int iCode_p,
Object param_p)
called by the framework to update the event target after the request was handled. |
protected void |
renderErrorsRegion(Writer w_p)
|
protected void |
renderExtraColumnHeader(Writer w_p)
overridable to render additional columns |
protected void |
renderExtraColumnRows(Writer w_p,
OwProperty prop_p)
overridable to render additional columns |
protected void |
renderGroupHeader(OwGroupPropertiesConfiguration.OwPropertyGroup theGroup_p,
Writer w_p,
String strRowClassName_p)
Render properties group header. |
protected void |
renderHorizontalProperties(Writer w_p)
Render properties horizontally. |
protected void |
renderHorizontalProperty(Writer w_p,
String strRowClassName_p,
OwProperty property_p,
OwPropertyClass propertyClass_p)
Render the property as a row in table. |
protected void |
renderHorizontalPropertyGroups(Writer w_p)
Render the properties groups |
protected void |
renderMainRegion(Writer w_p)
render the main region with the property list |
protected void |
renderModesRegion(Writer w_p)
render the modes region with the set properties modes |
void |
renderRegion(Writer w_p,
int iRegion_p)
render the views of the region |
protected boolean |
save(OwPropertyCollection changedProperties_p)
save the properties to the object |
void |
setBatchProperties(Collection set_p)
setter method for m_batchPropertySet |
protected void |
setDisplayNoSaveMsg(boolean display_p)
Set the configuration if a message should be displayed when nothing was changed. |
void |
setField(String sName_p,
Object value_p)
modify a Field value, but does not save the value right away |
void |
setGroupPropertiesConfiguration(OwGroupPropertiesConfiguration groupPropertyConfiguration_p)
Set the configuration for grouped properties. |
void |
setInformUserOnSuccess(boolean informUserOnSuccess)
Post success message on success flag setter. |
void |
setModeType(int modetype_p)
set mode type to use for getModes method |
void |
setNextActivateView(OwView nextView_p)
set the view that is next to this view, displays a next button to activate |
void |
setObjectRef(OwObject objectRef_p,
boolean showSystemProperties_p)
|
void |
setObjectRefEx(OwObject objectRef_p,
boolean showSystemProperties_p,
Collection propertyInfos_p)
|
void |
setPrevActivateView(OwView prevView_p)
set the view that is prev to this view, displays a prev button to activate |
void |
setReadOnlyContext(int context_p)
set context to be used for the readonly property |
void |
setSaveAllActive(boolean active_p)
m_saveAllActive setter |
void |
setSaveBtnIndex(int mIAppyBtnIndex_p)
|
void |
setUpdateNoChanges(boolean updateNoChanges)
Proceed with update calls even if no changes need to be saved boolean flag setter. |
void |
setViewMask(int iViewMask_p)
set the view properties |
protected OwPropertyCollection |
update(javax.servlet.http.HttpServletRequest request_p)
update view from request to save the changes call save |
boolean |
updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p,
boolean fSave_p)
update the target after a form event, so it can set its form fields |
protected String |
usesFormWithAttributes()
to get additional form attributes used for the form override if your view needs a form. |
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, getTitle, getViewList, isFormTargetExternal, isNamedRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, render, renderHTMLFormular, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal |
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget |
---|
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String BATCH_INDEX_PROPERTIES_ATTRIBTUE_BAG_NAME
public static final int ERRORS_REGION
public static final String GROUP_EXPANDED_CLASS_NAME
public static final String GROUP_COLLAPSED_CLASS_NAME
public static final int MAIN_REGION
public static final int MENU_REGION
public static final int MODES_REGION
protected static final String QUERY_KEY_PROPNAME
public static final int VIEW_MASK_DISABLE_INTERNAL_MENU
public static final int VIEW_MASK_ENABLE_PASTE_METADATA
public static final int VIEW_MASK_READONLY
public static final int VIEW_MASK_RENDER_VERTICAL
protected Collection m_batchIndexProperties
protected OwBatchPropertiesHandler m_batchPropertiesHandler
protected boolean m_enablesaveall
m_saveAllActive
is set to true
,
the m_enablesaveall
is set to true
and OwObjectPropertyView.m_fReadOnly
flag is false
.
protected boolean m_fAllPropertiesReadonly
protected boolean m_fReadOnly
protected boolean m_fSystem
protected int m_iAppyBtnIndex
protected int m_iLockIndex
protected int m_iNextButtonIndex
protected int m_iUnLockIndex
protected int m_iViewMask
protected OwSubMenuView m_MenuView
protected OwObject m_ObjectRef
protected OwPasteMetadataHandler m_pasteMetadataHandler
protected OwPropertyCollection m_Properties
protected int m_ReadOnlyContext
protected Map m_readOnlyProperties
protected boolean m_saveAllActive
m_saveAllActive
is set to true
,
the m_enablesaveall
is set to true
and OwObjectPropertyView.m_fReadOnly
flag is false
.
protected OwFieldManager m_theFieldManager
Constructor Detail |
---|
public OwObjectPropertyView()
Method Detail |
---|
public void setUpdateNoChanges(boolean updateNoChanges)
public void setInformUserOnSuccess(boolean informUserOnSuccess)
public void clearBatchIndex() throws OwInvalidOperationException
OwInvalidOperationException
protected OwBatchPropertiesHandler createBatchPropertiesHandler()
OwBatchPropertiesHandler
objectprotected OwPasteMetadataHandler createPasteMetadataHandler()
OwPasteMetadataHandler
object
public void detach()
detach
in class OwView
protected OwClipboard getClipboard()
public OwField getField(String strFieldClassName_p) throws Exception
getField
in interface OwFieldProvider
strFieldClassName_p
- String class name of requested fields
Exception
public OwFieldManager getFieldManager()
public String getFieldProviderName()
getFieldProviderName
in interface OwFieldProvider
public Object getFieldProviderSource()
getFieldProviderSource
in interface OwFieldProvider
public int getFieldProviderType()
getFieldProviderType
in interface OwFieldProvider
public Collection getFields() throws Exception
getFields
in interface OwFieldProvider
Exception
protected OwPropertyCollection getFilteredClonedProperties() throws Exception
Exception
public OwMenuView getMenu()
public OwObject getObjectRef()
protected String getRowClassName(int iIndex_p, OwProperty prop_p)
iIndex_p
- int row indexprop_p
- OwProperty current OwObject
public Object getSafeFieldValue(String sName_p, Object defaultvalue_p)
getSafeFieldValue
in interface OwFieldProvider
sName_p
- defaultvalue_p
-
public int getSaveBtnIndex()
public boolean getUpdateStatus()
protected boolean hasViewMask(int iViewMask_p)
iViewMask_p
- int as defined with VIEW_PROPERTY_...protected void informUserOnSuccess()
protected void init() throws Exception
init
in class OwView
Exception
protected boolean isGroupWithErrors(OwGroupPropertiesConfiguration.OwPropertyGroup theGroup_p) throws Exception
theGroup_p
-
true
if the group is with errors
Exception
public boolean isReadOnly()
true
if the properties are rendered in a read only waypublic boolean isRegion(int region_p)
OwLayout
isRegion
in interface OwBaseView
isRegion
in class OwLayout
region_p
- ID of the region to render
protected boolean isSupportLock()
public boolean isSystemPropertyView()
true
if this property view edits only system properties false
if this property view edits only NON system properties\public boolean isValidated() throws Exception
isValidated
in interface OwMultipanel
Exception
public Boolean mapProperties(Map map_p, String name_p)
public void onAjaxPropertyGroupCollapse(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
request_p
- - the HttpServletRequest
objectresponse_p
- - the HttpServletResponse
object.
Exception
public boolean onApply(javax.servlet.http.HttpServletRequest request_p, Object oReason_p) throws Exception
request_p
- HttpServletRequestoReason_p
- Optional reason object submitted in addMenuItem
Exception
protected boolean onApplyInternal(javax.servlet.http.HttpServletRequest request_p, Object oReason_p) throws Exception
request_p
- HttpServletRequestoReason_p
- Optional reason object submitted in addMenuItem
Exception
public void onBatchIndex() throws Exception
Exception
public void onLock(javax.servlet.http.HttpServletRequest request_p, Object oReason_p) throws Exception
oReason_p
- Optional reason object submitted in addMenuItemrequest_p
- HttpServletRequest
Exception
public void onNext(javax.servlet.http.HttpServletRequest request_p, Object oReason_p) throws Exception
oReason_p
- Optional reason object submitted in addMenuItemrequest_p
- HttpServletRequest
Exception
public void onPasteAllMetaData(javax.servlet.http.HttpServletRequest request_p) throws Exception
Exception
public void onPasteThisMetaData(javax.servlet.http.HttpServletRequest request_p) throws Exception
Exception
protected void onRender(Writer w_p) throws Exception
onRender
in class OwView
w_p
- Writer object to write HTML to
Exception
public void onUnLock(javax.servlet.http.HttpServletRequest request_p, Object oReason_p) throws Exception
oReason_p
- Optional reason object submitted in addMenuItemrequest_p
- HttpServletRequest
Exception
public void onUpdate(OwEventTarget caller_p, int iCode_p, Object param_p) throws Exception
onUpdate
in interface OwUpdateTarget
onUpdate
in class OwView
caller_p
- OwEventTarget target that called updateiCode_p
- int optional reason codeparam_p
- Object optional parameter representing the refresh, depends on the value of iCode_p, can be null
Exception
protected void renderErrorsRegion(Writer w_p) throws Exception
Exception
protected void renderExtraColumnHeader(Writer w_p) throws Exception
w_p
- Writer
Exception
protected void renderExtraColumnRows(Writer w_p, OwProperty prop_p) throws Exception
w_p
- Writerprop_p
- current OwProperty to render
Exception
protected void renderGroupHeader(OwGroupPropertiesConfiguration.OwPropertyGroup theGroup_p, Writer w_p, String strRowClassName_p) throws Exception
theGroup_p
- w_p
- strRowClassName_p
-
Exception
protected void renderHorizontalProperties(Writer w_p) throws Exception
w_p
-
Exception
protected void renderHorizontalProperty(Writer w_p, String strRowClassName_p, OwProperty property_p, OwPropertyClass propertyClass_p) throws Exception
w_p
- - the writerstrRowClassName_p
- - the CSS class nameproperty_p
- - the property to be renderedpropertyClass_p
- - the property class
Exception
protected void renderHorizontalPropertyGroups(Writer w_p) throws Exception
w_p
-
Exception
protected void renderMainRegion(Writer w_p) throws Exception
w_p
- Writer object to write HTML to
Exception
protected void renderModesRegion(Writer w_p) throws Exception
w_p
- Writer object to write HTML to
Exception
public void renderRegion(Writer w_p, int iRegion_p) throws Exception
renderRegion
in interface OwBaseView
renderRegion
in class OwLayout
w_p
- Writer object to write HTML toiRegion_p
- ID of the region to render
Exception
protected boolean save(OwPropertyCollection changedProperties_p) throws Exception
changedProperties_p
- OwPropertyCollection see update
Exception
public void setBatchProperties(Collection set_p)
set_p
- The propMap to set.protected void setDisplayNoSaveMsg(boolean display_p)
display_p
- boolean flagpublic void setField(String sName_p, Object value_p) throws Exception, OwObjectNotFoundException
setField
in interface OwFieldProvider
sName_p
- value_p
-
Exception
OwObjectNotFoundException
public void setGroupPropertiesConfiguration(OwGroupPropertiesConfiguration groupPropertyConfiguration_p)
groupPropertyConfiguration_p
- - the configuration object.public void setModeType(int modetype_p)
modetype_p
- int as defined in OwObjectClass.OPERATION_TYPE_...OwObjectClass.getModes(int)
public void setNextActivateView(OwView nextView_p) throws Exception
setNextActivateView
in interface OwMultipanel
nextView_p
- OwView
Exception
public void setObjectRef(OwObject objectRef_p, boolean showSystemProperties_p) throws Exception
objectRef_p
- The objectRef to set.showSystemProperties_p
- if true show only system properties.
Exception
public void setObjectRefEx(OwObject objectRef_p, boolean showSystemProperties_p, Collection propertyInfos_p) throws Exception
objectRef_p
- The objectRef to set.showSystemProperties_p
- if true show only system properties.propertyInfos_p
- collection of property info objects describing the properties to edit and their readonly state, or null to edit all
Exception
public void setPrevActivateView(OwView prevView_p) throws Exception
setPrevActivateView
in interface OwMultipanel
prevView_p
- OwView
Exception
public void setReadOnlyContext(int context_p)
context_p
- int as defined with OwPropertyClass.CONTEXT_...public void setSaveAllActive(boolean active_p)
m_saveAllActive
setter
active_p
- true
if the Save All should be active.public void setSaveBtnIndex(int mIAppyBtnIndex_p)
public void setViewMask(int iViewMask_p)
iViewMask_p
- int a combination of VIEW_PROPERTY_... defined flagsprotected OwPropertyCollection update(javax.servlet.http.HttpServletRequest request_p) throws Exception
Exception
public boolean updateExternalFormTarget(javax.servlet.http.HttpServletRequest request_p, boolean fSave_p) throws Exception
updateExternalFormTarget
in class OwEventTarget
request_p
- HttpServletRequestfSave_p
- boolean true = save the changes of the form data, false = just update the form data, but do not save
Exception
protected String usesFormWithAttributes()
usesFormWithAttributes
in class OwView
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |