|
||||||||||
| 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.dmsdialogs.views.OwObjectPropertyFormularView
public class OwObjectPropertyFormularView
Form View for Object Properties. Can take JSP or HTML based forms.
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 |
OwObjectPropertyFormularView.OwPropertyPlaceholder
tuple after a successful placeholder scan |
| Field Summary | |
|---|---|
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 OwObjectPropertyFormView.isReadOnly
flag is false. |
protected int |
m_iSaveButton
index of the save button |
protected OwPasteMetadataHandler |
m_pasteMetadataHandler
paste metadata handler |
protected OwPropertyCollection |
m_properties
the properties from the work item |
protected boolean |
m_saveAllActive
flag specify if save all feature is active |
protected int |
m_saveAllButtonIndex
save all button index |
protected OwFieldManager |
m_theFieldManager
instance of the property field class |
| 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 | |
|---|---|
OwObjectPropertyFormularView()
|
|
| Method Summary | |
|---|---|
protected void |
addSaveAllButton(String saveAllText_p)
Add Save All button |
protected void |
changeSaveAllButtonState()
Establish the enabled state for saveAll button |
protected OwBatchPropertiesHandler |
createBatchPropertiesHandler()
Creates the batch properties handler |
protected OwPasteMetadataHandler |
createPasteMetadataHandler()
Create a OwPasteMetadataHandler object |
void |
detach()
remove view and all subviews from context |
boolean |
displayNoSaveMsg()
Display "no save" message. |
void |
filterProperties(Collection<OwObjectPropertyView.OwPropertyInfo> propertyInfos_p)
Filter properties based on provided collection. |
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 |
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 |
OwJspFormConfigurator |
getJspConfigurator()
Get the associated OwJspFormConfigurator object. |
OwMenuView |
getMenu()
get the menu |
OwObject |
getObjectRef()
get the current object to use for property rendering |
protected int |
getReadOnlyContext()
get context to be used for the read-only property |
Object |
getSafeFieldValue(String sName_p,
Object defaultvalue_p)
retrieve the value of a Field |
protected int |
getSaveBtnIndex()
get the index of the save button |
boolean |
getUpdateStatus()
get the status after the last update |
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. |
boolean |
isFieldMandatory(String strPlaceHolder_p)
Checks if a field is mandatory or not. |
boolean |
isNamedRegion(String strRegion_p)
determine if region exists |
boolean |
isPasteMetadataActivated()
Get the status of "paste metadata" feature. |
boolean |
isReadOnly()
|
boolean |
isSystemPropertyView()
Always returns false. |
void |
onBatchIndex()
Update the specified properties (from owplugins->EditBatchPropertyList) with the values from previous view. |
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 |
boolean |
onSave(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
called when the user wants to save the modified properties call getUpdateStatus() after save to check if fields are invalid |
protected boolean |
onSaveInternal(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
called to save the modified properties call getUpdateStatus() after save to check if fields are invalid |
protected void |
renderMenuRegion(Writer w_p)
render the menu region |
void |
renderNamedRegion(Writer w_p,
String strPlaceHolder_p)
Called when the form parser finds a placeholder in the HTML / JSP input |
void |
renderPasteAll(Writer w_p)
Utility method to render "paste all" symbol. |
void |
renderPasteProperty(Writer w_p,
String propName_p)
Utility method to render "paste" symbol. |
protected void |
renderProperty(Writer w_p,
OwProperty prop_p,
boolean fReadOnly_p)
overridable to render a property |
protected boolean |
save(OwPropertyCollection changedProperties_p)
save the properties to the object |
void |
setBatchProperties(Collection batchIndexProperties_p)
Set the collection of property names for batch feature. |
void |
setDisplayNoSaveMsg(boolean display_p)
Set the flag if "no save" message(s) should be displayed or not. |
void |
setField(String sName_p,
Object value_p)
modify a Field value, but does not save the value right away |
void |
setHTMLFormular(String strHTMLPage_p)
set the JSP page to use as a form |
void |
setJspConfigurator(OwJspFormConfigurator jspFormConfigurator_p)
Set the associated OwJspFormConfigurator object. |
void |
setJspFormular(String strJspPage_p)
set the optional JSP form to use in the render method In the JSP Form you can use the following statements to display and manipulate Properties // get a reference to the calling view OwView m_View = (OwView)request.getAttribute(OwView.CURRENT_MODULE_KEY); <% m_View.renderNamedRegion(out, <% m_View.renderNamedRegion(out,ow_err_ <% m_View.renderNamedRegion(out,ow_ro_ <% m_View.renderNamedRegion(out,ow_menu); %> : renders a function menu to save changes You can also cast the m_View to OwFieldProvider to retrieve a OwField instance and manipulate or program a field directly. |
void |
setObjectRef(OwObject objectRef_p)
|
void |
setPasteMetadataEnabled(boolean enabled_p)
Set the enabled status for paste metadata feature. |
void |
setReadOnlyContext(int context_p)
set context to be used for the read-only property |
void |
setSaveAllActive(boolean saveAllEnabled_p)
Setter for saveAll button state. |
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.OwView |
|---|
activate, addView, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, isFormTargetExternal, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, renderRegion, 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 boolean m_enablesaveall
m_saveAllActive is set to true,
the m_enablesaveall is set to true and OwObjectPropertyFormView.isReadOnly
flag is false.
protected int m_iSaveButton
protected OwPasteMetadataHandler m_pasteMetadataHandler
protected OwPropertyCollection m_properties
protected boolean m_saveAllActive
protected int m_saveAllButtonIndex
protected OwFieldManager m_theFieldManager
| Constructor Detail |
|---|
public OwObjectPropertyFormularView()
| Method Detail |
|---|
protected void addSaveAllButton(String saveAllText_p)
throws Exception
saveAllText_p - - the text to be displayed in the button
Exceptionprotected void changeSaveAllButtonState()
protected OwBatchPropertiesHandler createBatchPropertiesHandler()
OwBatchPropertiesHandler objectprotected OwPasteMetadataHandler createPasteMetadataHandler()
OwPasteMetadataHandler object
public void detach()
detach in class OwViewpublic boolean displayNoSaveMsg()
setDisplayNoSaveMsg(boolean)
public void filterProperties(Collection<OwObjectPropertyView.OwPropertyInfo> propertyInfos_p)
throws Exception
propertyInfos_p - - can be null - no filter is applied.
Exception
public OwField getField(String strFieldClassName_p)
throws Exception
getField in interface OwFieldProviderstrFieldClassName_p - String class name of requested fields
Exceptionpublic OwFieldManager getFieldManager()
public String getFieldProviderName()
getFieldProviderName in interface OwFieldProviderpublic Object getFieldProviderSource()
getFieldProviderSource in interface OwFieldProviderpublic int getFieldProviderType()
getFieldProviderType in interface OwFieldProvider
public Collection getFields()
throws Exception
getFields in interface OwFieldProviderExceptionpublic OwJspFormConfigurator getJspConfigurator()
OwJspConfigurableOwJspFormConfigurator object. Can be null.
getJspConfigurator in interface OwJspConfigurableOwJspFormConfigurator object or null.public OwMenuView getMenu()
public OwObject getObjectRef()
protected int getReadOnlyContext()
public Object getSafeFieldValue(String sName_p,
Object defaultvalue_p)
getSafeFieldValue in interface OwFieldProvidersName_p - defaultvalue_p -
protected int getSaveBtnIndex()
public boolean getUpdateStatus()
protected void informUserOnSuccess()
protected void init()
throws Exception
init in class OwViewException
public boolean isNamedRegion(String strRegion_p)
throws Exception
isNamedRegion in interface OwBaseViewisNamedRegion in class OwViewstrRegion_p - name of the region to render
of the following form:
[ow_err_ | ow_ro_]Exceptionpublic boolean isPasteMetadataActivated()
true if the JSP should render the Paste All and Paste buttons.public boolean isReadOnly()
public boolean isSystemPropertyView()
false.
false
public void onBatchIndex()
throws Exception
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 IOException,
Exception
onRender in class OwVieww_p - Writer object to write HTML to
Exception
IOException
public boolean onSave(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
throws Exception
Exception
protected boolean onSaveInternal(javax.servlet.http.HttpServletRequest request_p,
Object oReason_p)
throws Exception
Exception
protected void renderMenuRegion(Writer w_p)
throws Exception
Exception
public boolean isFieldMandatory(String strPlaceHolder_p)
throws Exception
strPlaceHolder_p - The name of the field (usually this is the same with the name of the property). It has to be a fully qualified name (include the name of the class too);
ExceptionrenderNamedRegion(Writer, String)
public void renderNamedRegion(Writer w_p,
String strPlaceHolder_p)
throws Exception
renderNamedRegion in interface OwBaseViewrenderNamedRegion in class OwViewstrPlaceHolder_p - the placeholder string found
of the following form:
[ow_err_ | ow_ro_]w_p - Writer object, write to replace placeholder
Exception
public void renderPasteAll(Writer w_p)
throws Exception
w_p - - the Writer object
Exception
public void renderPasteProperty(Writer w_p,
String propName_p)
throws Exception
w_p - - Writer objectpropName_p - - the name of the property
Exception
protected void renderProperty(Writer w_p,
OwProperty prop_p,
boolean fReadOnly_p)
throws Exception
Exception
protected boolean save(OwPropertyCollection changedProperties_p)
throws Exception
changedProperties_p - OwPropertyCollection see update
Exceptionpublic void setBatchProperties(Collection batchIndexProperties_p)
batchIndexProperties_p - public void setDisplayNoSaveMsg(boolean display_p)
display_p - boolean flag
public void setField(String sName_p,
Object value_p)
throws Exception,
OwObjectNotFoundException
setField in interface OwFieldProvidersName_p - value_p -
Exception
OwObjectNotFoundExceptionpublic void setHTMLFormular(String strHTMLPage_p)
public void setJspConfigurator(OwJspFormConfigurator jspFormConfigurator_p)
OwJspConfigurableOwJspFormConfigurator object. Can be null.
setJspConfigurator in interface OwJspConfigurable
public void setJspFormular(String strJspPage_p)
throws Exception
strJspPage_p -
Exception
public void setObjectRef(OwObject objectRef_p)
throws Exception
objectRef_p - The objectRef to set.
Exceptionpublic void setPasteMetadataEnabled(boolean enabled_p)
enabled_p - public void setReadOnlyContext(int context_p)
context_p - int as defined with OwPropertyClass.CONTEXT_...public void setSaveAllActive(boolean saveAllEnabled_p)
saveAllEnabled_p -
protected 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 OwEventTargetrequest_p - HttpServletRequestfSave_p - boolean true = save the changes of the form data, false = just update the form data, but do not save
Exceptionprotected String usesFormWithAttributes()
usesFormWithAttributes in class OwView
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||