com.wewebu.ow.server.fieldctrlimpl
Class OwFieldManagerControlObject

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.OwFieldManagerControlObject

public class OwFieldManagerControlObject
extends OwFieldManagerControl

Field Control to display properties of type OwObject.

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


Field Summary
protected static String ATTACHMENT_DMS_ID
          query key for the attachment DMSID used in renderAttachment
protected static String PLUG_INDEX_KEY
          query key for the attachment plugin index used in renderAttachment
 
Constructor Summary
OwFieldManagerControlObject()
           
 
Method Summary
 void insertEditField(Writer w_p, OwFieldDefinition fieldDef_p, OwField field_p, String strID_p)
          formates 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.
 void insertReadOnlyField(Writer w_p, OwFieldDefinition fieldDef_p, Object value_p)
          formats and displays the value attached to the PropertyClass in HTML
 void onDeleteArrayItem(javax.servlet.http.HttpServletRequest request_p)
          called when user clicks to delete an array item
 void onPasteObjectArrayItem(javax.servlet.http.HttpServletRequest request_p)
          called when user clicks to paste an object array item from clipboard
 void onPasteObjectReference(javax.servlet.http.HttpServletRequest request_p)
          called when user presses SetImage
protected  void renderObjectReferenceLink(Writer w_p, OwFieldDefinition fieldDef_p, OwObjectReference obj_p, String strID_p, boolean fEdit_p)
          insert a link for OwObject values
protected  void renderObjectReferenceLinkInternal(Writer w_p, OwFieldDefinition fieldDef_p, OwObjectReference obj_p, String strID_p, boolean fEdit_p)
          insert a link for OwObject values
protected  void renderPasteObjectLink(Writer w_p, String strID_p, OwFieldDefinition fieldDef_p)
          render the clipboard paste link
 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
 
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
 

Field Detail

ATTACHMENT_DMS_ID

protected static final String ATTACHMENT_DMS_ID
query key for the attachment DMSID used in renderAttachment

See Also:
Constant Field Values

PLUG_INDEX_KEY

protected static final String PLUG_INDEX_KEY
query key for the attachment plugin index used in renderAttachment

See Also:
Constant Field Values
Constructor Detail

OwFieldManagerControlObject

public OwFieldManagerControlObject()
Method Detail

insertReadOnlyField

public void insertReadOnlyField(Writer w_p,
                                OwFieldDefinition fieldDef_p,
                                Object value_p)
                         throws Exception
formats 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

renderObjectReferenceLinkInternal

protected void renderObjectReferenceLinkInternal(Writer w_p,
                                                 OwFieldDefinition fieldDef_p,
                                                 OwObjectReference obj_p,
                                                 String strID_p,
                                                 boolean fEdit_p)
                                          throws Exception
insert a link for OwObject values

Parameters:
w_p - Writer object
fieldDef_p - OwFieldDefinition
obj_p - OwObject to render
strID_p - String field ID
fEdit_p - boolean true = edit field, false = read only field
Throws:
Exception

renderObjectReferenceLink

protected void renderObjectReferenceLink(Writer w_p,
                                         OwFieldDefinition fieldDef_p,
                                         OwObjectReference obj_p,
                                         String strID_p,
                                         boolean fEdit_p)
                                  throws Exception
insert a link for OwObject values

Parameters:
w_p - Writer object
fieldDef_p - OwFieldDefinition
obj_p - OwObject to render
strID_p - String field ID
fEdit_p - boolean true = edit field, false = read only field
Throws:
Exception

renderPasteObjectLink

protected void renderPasteObjectLink(Writer w_p,
                                     String strID_p,
                                     OwFieldDefinition fieldDef_p)
                              throws Exception
render the clipboard paste link

Parameters:
w_p - Writer
strID_p - ID of item
fieldDef_p - - OwFieldDefinition, used to identify if single or array value, since 4.1.1.0
Throws:
Exception

onPasteObjectReference

public void onPasteObjectReference(javax.servlet.http.HttpServletRequest request_p)
                            throws Exception
called when user presses SetImage

Throws:
Exception

insertEditField

public void insertEditField(Writer w_p,
                            OwFieldDefinition fieldDef_p,
                            OwField field_p,
                            String strID_p)
                     throws Exception
formates 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

onDeleteArrayItem

public void onDeleteArrayItem(javax.servlet.http.HttpServletRequest request_p)
                       throws Exception
called when user clicks to delete an array item

Throws:
Exception

onPasteObjectArrayItem

public void onPasteObjectArrayItem(javax.servlet.http.HttpServletRequest request_p)
                            throws Exception
called when user clicks to paste an object array item from clipboard

Throws:
Exception

updateField

public 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

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

insertLabel

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

Overrides:
insertLabel in class OwFieldManagerControl
Parameters:
w_p - Writer
suffix_p - String
fieldDef_p - Field Definition
writeLabel_p - force write label
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.