com.wewebu.ow.server.app
Class OwFieldManagerControl

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.app.OwFieldManagerControl
Direct Known Subclasses:
OwFieldManagerControlClass, OwFieldManagerControlImage, OwFieldManagerControlImageInsteadOfValue, OwFieldManagerControlModifiedProperties, OwFieldManagerControlNote, OwFieldManagerControlObject, OwLastDaysDateControl, OwNextDaysDateControl, OwNumberFieldControl

public abstract class OwFieldManagerControl
extends OwEventTarget

Base Class for field manager UI Controls.

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


Constructor Summary
OwFieldManagerControl()
           
 
Method Summary
 OwFieldManager getFieldManager()
           
 String getFormEventFunction(String strEventName_p, String strAdditionalParameters_p)
          overridden from OwEventTarget get a URL for the requested event sending the form data defined in the FieldManager.getFormName()
 String getFormEventURL(String strEventName_p, String strAdditionalParameters_p)
          overridden from OwEventTarget get a URL for the requested event sending the form data defined in the FieldManager.getFormName()
 OwEventTarget getFormTarget()
          get the target, that is used for form date and renders form
protected  void init()
          init the target after the context is set.
 void init(OwFieldManager fieldmanager_p, Node configNode_p)
          initialization of a field control to display fields
abstract  void insertEditField(Writer w_p, OwFieldDefinition fieldDef_p, OwField field_p, String strID_p)
          format and displays the value attached to the fieldClass in HTML for use in a HTML Form.
 void insertLabel(Writer w_p, String suffix_p, OwFieldDefinition fieldDef_p, String strID_p, boolean writeLabel_p)
          Renders a property control label on the given Writer.
value type are considered at rendering time.
abstract  void insertReadOnlyField(Writer w_p, OwFieldDefinition fieldDef_p, Object value_p)
          format and displays the value attached to the PropertyClass in HTML
abstract  Object updateField(javax.servlet.http.HttpServletRequest request_p, OwFieldDefinition fieldDef_p, Object value_p, String strID_p)
          update the property value upon request and validates the new value.
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
attach, detach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormName, getID, onExternalRequest, onFormEvent, onRequest, setExternalFormTarget, updateExternalFormTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwFieldManagerControl

public OwFieldManagerControl()
Method Detail

init

public void init(OwFieldManager fieldmanager_p,
                 Node configNode_p)
          throws Exception
initialization of a field control to display fields

Parameters:
fieldmanager_p - OwFieldManager reference to the fieldmanager containing the field control
configNode_p - DOM Node to the configuration XML for the control, or null to use defaults
Throws:
Exception

init

protected void init()
             throws Exception
Description copied from class: OwEventTarget
init the target after the context is set.

Specified by:
init in class OwEventTarget
Throws:
Exception

getFieldManager

public OwFieldManager getFieldManager()

getFormTarget

public OwEventTarget getFormTarget()
get the target, that is used for form date and renders form

Overrides:
getFormTarget in class OwEventTarget
Returns:
OwEventTarget

getFormEventURL

public String getFormEventURL(String strEventName_p,
                              String strAdditionalParameters_p)
overridden from OwEventTarget get a URL for the requested event sending the form data defined in the FieldManager.getFormName()

Overrides:
getFormEventURL in class OwEventTarget
Parameters:
strEventName_p - Function name to be called upon event fired
strAdditionalParameters_p - additional query string with parameters.
Returns:
String URL for current form

getFormEventFunction

public String getFormEventFunction(String strEventName_p,
                                   String strAdditionalParameters_p)
overridden from OwEventTarget get a URL for the requested event sending the form data defined in the FieldManager.getFormName()

Overrides:
getFormEventFunction in class OwEventTarget
Parameters:
strEventName_p - Function name to be called upon event fired
strAdditionalParameters_p - additional query string with parameters.
Returns:
String function for form submit

insertReadOnlyField

public abstract void insertReadOnlyField(Writer w_p,
                                         OwFieldDefinition fieldDef_p,
                                         Object value_p)
                                  throws Exception
format and displays the value attached to the PropertyClass in HTML

Parameters:
w_p - Writer object to write HTML to
fieldDef_p - OwFieldDefinition definition of field
value_p - Object Value to be displayed
Throws:
Exception

insertEditField

public abstract void insertEditField(Writer w_p,
                                     OwFieldDefinition fieldDef_p,
                                     OwField field_p,
                                     String strID_p)
                              throws Exception
format and displays the value attached to the fieldClass in HTML for use in a HTML Form. It also creates the necessary code to update the value in the form upon request.

Parameters:
w_p - Writer object to write HTML to
fieldDef_p - OwFieldDefinition
field_p - OwField Value to be displayed
strID_p - ID of the HTML element
Throws:
Exception

updateField

public abstract Object updateField(javax.servlet.http.HttpServletRequest request_p,
                                   OwFieldDefinition fieldDef_p,
                                   Object value_p,
                                   String strID_p)
                            throws Exception
update the property value upon request and validates the new value. Updates the object, which was displayed in a form using the getEditHTML(...) code. Throws Exception if new value could not be validated

Parameters:
request_p - HttpServletRequest
fieldDef_p - OwFieldDefinition
value_p - Object old Value
strID_p - ID of the HTML element
Throws:
Exception

insertLabel

public void insertLabel(Writer w_p,
                        String suffix_p,
                        OwFieldDefinition fieldDef_p,
                        String strID_p,
                        boolean writeLabel_p)
                 throws Exception
Renders a property control label on the given Writer.
value type are considered at rendering time.

Parameters:
w_p - Writer
fieldDef_p - Field Definition
suffix_p - String
writeLabel_p - force write label
Throws:
Exception
Since:
3.2.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.