com.wewebu.ow.server.fieldctrlimpl
Class OwFieldManagerControlClass

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.app.OwFieldManagerControl
          extended by com.wewebu.ow.server.fieldctrlimpl.OwFieldManagerControlClass

public class OwFieldManagerControlClass
extends OwFieldManagerControl

Control to display a Image Property.

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
OwFieldManagerControlClass()
           
 
Method Summary
protected  OwClass[] fromFieldValue(Object value_p, OwFieldDefinition fieldDef_p)
          Converts the field value to an array of OwClass objects considering the field definition.
protected  void insertClassOption(Writer w_p, OwFieldDefinition fieldDef_p, OwClass value_p, int optionIndex_p)
          HTML class defining <option> element insertion method
 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 insertReadOnlyField(Writer w_p, OwFieldDefinition fieldDef_p, Object value_p)
          format and displays the value attached to the PropertyClass in HTML
protected  void insertSingleReadOnlyField(Writer w_p, OwFieldDefinition fieldDef_p, Object value_p)
           
protected  String retrieveDisplayName(OwClass owClass_p)
          Attempts to retrieve the display name of the class defined by the given OwClass parameter.
protected  Object toFieldValue(OwClass[] classValues_p, OwFieldDefinition fieldDef_p)
          Converts an OwClass array to a field value considering the field definition If the field is not defined as an array the value at index 0 is returned.
 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.app.OwFieldManagerControl
getFieldManager, getFormEventFunction, getFormEventURL, getFormTarget, init, init, insertLabel
 
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

OwFieldManagerControlClass

public OwFieldManagerControlClass()
Method Detail

insertReadOnlyField

public void insertReadOnlyField(Writer w_p,
                                OwFieldDefinition fieldDef_p,
                                Object value_p)
                         throws Exception
Description copied from class: OwFieldManagerControl
format and displays the value attached to the PropertyClass in HTML

Specified by:
insertReadOnlyField in class OwFieldManagerControl
Parameters:
w_p - Writer object to write HTML to
fieldDef_p - OwFieldDefinition definition of field
value_p - Object Value to be displayed
Throws:
Exception

insertSingleReadOnlyField

protected void insertSingleReadOnlyField(Writer w_p,
                                         OwFieldDefinition fieldDef_p,
                                         Object value_p)
                                  throws Exception
Throws:
Exception

insertEditField

public void insertEditField(Writer w_p,
                            OwFieldDefinition fieldDef_p,
                            OwField field_p,
                            String strID_p)
                     throws Exception
Description copied from class: OwFieldManagerControl
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.

Specified by:
insertEditField in class OwFieldManagerControl
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

fromFieldValue

protected OwClass[] fromFieldValue(Object value_p,
                                   OwFieldDefinition fieldDef_p)
                            throws Exception
Converts the field value to an array of OwClass objects considering the field definition. If the field is not defined as an array an array with size 1 is returned containing the field value.

Parameters:
value_p - the field value
fieldDef_p - the field definition
Returns:
the field value as an array of OwClass objects
Throws:
Exception
Since:
3.0.0.0

toFieldValue

protected Object toFieldValue(OwClass[] classValues_p,
                              OwFieldDefinition fieldDef_p)
                       throws Exception
Converts an OwClass array to a field value considering the field definition If the field is not defined as an array the value at index 0 is returned.

Parameters:
classValues_p -
fieldDef_p -
Returns:
the field value
Throws:
Exception
Since:
3.0.0.0

retrieveDisplayName

protected String retrieveDisplayName(OwClass owClass_p)
Attempts to retrieve the display name of the class defined by the given OwClass parameter. If the display name can not be retrieve the system class name is returned. If the OwClass is null an empty string will be returned.

Parameters:
owClass_p -
Returns:
the display name of the class defined by the given OwClass parameter
Since:
3.0.0.0

insertClassOption

protected void insertClassOption(Writer w_p,
                                 OwFieldDefinition fieldDef_p,
                                 OwClass value_p,
                                 int optionIndex_p)
                          throws Exception
HTML class defining <option> element insertion method

Parameters:
w_p -
fieldDef_p -
value_p -
optionIndex_p - index at which the class will be rendered in the select control
Throws:
Exception
Since:
3.0.0.0

updateField

public Object updateField(javax.servlet.http.HttpServletRequest request_p,
                          OwFieldDefinition fieldDef_p,
                          Object value_p,
                          String strID_p)
                   throws Exception
Description copied from class: OwFieldManagerControl
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

Specified by:
updateField in class OwFieldManagerControl
Parameters:
request_p - HttpServletRequest
fieldDef_p - OwFieldDefinition
value_p - Object old Value
strID_p - ID of the HTML element
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.