public class OwFieldManagerControlImageInsteadOfValue extends OwFieldManagerControl
Control to display an image depending of an property value.
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 and Description |
---|
OwFieldManagerControlImageInsteadOfValue() |
Modifier and Type | Method and Description |
---|---|
String |
getUrl(String value_p,
int urlPart)
Generates and returns the appropriate URL in dependence server URL and path configured in bootstrap configuration.
|
void |
init(OwFieldManager fieldmanager_p,
Node configNode_p)
Initializes the field control from configuration node
|
void |
insertEditField(Writer w_p,
OwFieldDefinition fieldDef_p,
OwField field_p,
String strID_p)
Formats 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)
Formats and displays the value attached to the PropertyClass in HTML
|
String |
insertUpdateFunction(String strID_p)
Inserts a Java Script function for updating the icon respectively image on changing the value in drop down.
|
void |
renderImage(Writer w_p,
OwFieldDefinition fieldDef_p,
Object value_p,
String id_p)
render an image depending on provided value
|
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.
|
getFieldManager, getFormEventFunction, getFormEventURL, getFormName, getFormTarget, init, insertLabel
attach, detach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest, setExternalFormTarget, updateExternalFormTarget
public OwFieldManagerControlImageInsteadOfValue()
public void init(OwFieldManager fieldmanager_p, Node configNode_p) throws Exception
init
in class OwFieldManagerControl
fieldmanager_p
- OwFieldManager reference to the field manager containing the field controlconfigNode_p
- DOM Node to the configuration XML for the control, or null to use defaultsException
OwFieldManagerControl.init(com.wewebu.ow.server.app.OwFieldManager, org.w3c.dom.Node)
public String getUrl(String value_p, int urlPart) throws Exception
value_p
- represents the value of field selected in drop down list coming from ECM backend.
This Parameter represents also the part of filename so for example value "New" is selected then
the file name could be in dependence of configuration "status_new.png".urlPart
- represents the URL part which will be returned.
- Parameter "BEGIN_URL" returns the first part of URL without value/wildcard
- Parameter "END_URL returns the last part of URL without value/wildcard (".png")
- Parameter "COMPLETE_URL returns the complete URL including complete filename in dependence of selected valueException
public String insertUpdateFunction(String strID_p) throws Exception
strID_p
- identifies Drop Down element in JSP PageException
public void renderImage(Writer w_p, OwFieldDefinition fieldDef_p, Object value_p, String id_p) throws Exception
w_p
- Writer object to write HTML tofieldDef_p
- OwFieldDefinition definition of fieldvalue_p
- Object Value to be displayedid_p
- String id which should be provided to rendered image tag (can be null, then no Id is rendered)Exception
public void insertReadOnlyField(Writer w_p, OwFieldDefinition fieldDef_p, Object value_p) throws Exception
insertReadOnlyField
in class OwFieldManagerControl
w_p
- Writer object to write HTML tofieldDef_p
- OwFieldDefinition definition of fieldvalue_p
- Object Value to be displayedException
public void insertEditField(Writer w_p, OwFieldDefinition fieldDef_p, OwField field_p, String strID_p) throws Exception
insertEditField
in class OwFieldManagerControl
w_p
- Writer object to write HTML tofieldDef_p
- OwFieldDefinitionfield_p
- OwField Value to be displayedstrID_p
- ID of the HTML elementException
public Object updateField(javax.servlet.http.HttpServletRequest request_p, OwFieldDefinition fieldDef_p, Object value_p, String strID_p) throws Exception
updateField
in class OwFieldManagerControl
request_p
- HttpServletRequestfieldDef_p
- OwFieldDefinitionvalue_p
- Object old ValuestrID_p
- ID of the HTML elementException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.