public class OwSettingsPropertyLanguageString extends OwAbstractSettingsPropertyControl
A single settings String property that can be configured language dependent. e.g. you can set a different string for each language.
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
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ITEM_QUERY_KEY
query key for the item parameter for the delete event
|
protected Map<?,?> |
m_defaultValue
default value of property
|
protected String |
m_strError
a error message for this field, if update failed
|
protected Map |
m_value
current value of property
|
m_externalFormEventTarget, m_propertyDefinitionNode, m_strSetNameITEM_VALUE_NODE| Constructor and Description |
|---|
OwSettingsPropertyLanguageString() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
createSingleClonedValue(Object oSingleValue_p)
create a clone out of the given single property value
|
protected Map |
createValueMap(Node valueNode_p)
create a list of values, if property is a list
|
protected Object |
getDefaultListItemValue()
overridable to create a default value for list properties
|
Locale |
getLocaleFromContext()
get locale from context
|
String |
getPropertyError()
Gets a error message for this field
|
String |
getSafePropertyError()
gets a error message for this field, if update failed, clears the message automatically
|
protected Object |
getSingleValue(Node valueNode_p)
overridable to create a single value for the given node
|
Object |
getValue()
get current value of property
|
Node |
getValueNode(Document doc_p)
return the property value as a DOM Node for serialization
|
boolean |
hasError()
Check if this property has an error associated, without clear the error message
|
void |
init(Node propertyDefinitionNode_p,
Node valueNode_p,
String strSetName_p)
set current value of property, to be overridden
|
void |
insertFormField(Writer w_p)
insert the property into a HTML form for editing
|
void |
insertLabel(Writer w_p) |
protected void |
insertLabelValue(Writer w_p,
String displayName,
String strID_p) |
boolean |
isList()
get flag indicating list or scalar value
|
boolean |
isModified()
true = value was modified, false otherwise
|
void |
onAdd(javax.servlet.http.HttpServletRequest request_p)
called when user clicked the add item button for a list property
|
void |
onDelete(javax.servlet.http.HttpServletRequest request_p)
called when user clicked a delete button on a list entry
|
void |
saved()
signal that value was saved and modified flag can be reset
|
void |
setDefault()
set the default value
|
void |
setLocaleFromContext(OwMainAppContext mainContext_p)
set locale from context
|
void |
setValue(Object value_p)
set current value of property, to be overridden
|
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
|
getDisplayName, getFormName, getFormTarget, getHelpPath, getName, getPropertyDefinitionNode, init, isEditable, isUser, setExternalFormTarget, toStringattach, detach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequestprotected Map<?,?> m_defaultValue
protected static final String ITEM_QUERY_KEY
protected Map m_value
protected String m_strError
public Object getValue()
protected Object createSingleClonedValue(Object oSingleValue_p)
createSingleClonedValue in class OwSettingsPropertyControloSingleValue_p - single Object valuepublic boolean isModified()
isModified in class OwSettingsPropertyControlpublic void saved()
protected Object getDefaultListItemValue() throws Exception
Exceptionpublic boolean isList()
public void setValue(Object value_p)
value_p - Objectpublic 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 saveExceptionpublic String getSafePropertyError()
getSafePropertyError in class OwSettingsPropertyControlpublic boolean hasError()
OwSettingsPropertyControlhasError in class OwSettingsPropertyControlOwSettingsPropertyControl.hasError()public String getPropertyError()
OwSettingsPropertyControlgetPropertyError in class OwSettingsPropertyControlOwSettingsPropertyControl.getPropertyError()public void insertFormField(Writer w_p) throws Exception
insertFormField in class OwSettingsPropertyControlw_p - Writer to write HTML code toExceptionpublic void onDelete(javax.servlet.http.HttpServletRequest request_p)
throws Exception
request_p - HttpServletRequestExceptionpublic void onAdd(javax.servlet.http.HttpServletRequest request_p)
throws Exception
request_p - HttpServletRequestExceptionpublic void setDefault()
OwSettingsPropertypublic Node getValueNode(Document doc_p)
doc_p - DOM Document to add topublic void init(Node propertyDefinitionNode_p, Node valueNode_p, String strSetName_p) throws Exception
init in interface OwSettingsPropertyinit in class OwAbstractSettingsPropertyControlpropertyDefinitionNode_p - the node which defines the property in the plugin descriptors settingvalueNode_p - the node with the current valuestrSetName_p - name of the property set for which the property is createdExceptionprotected Object getSingleValue(Node valueNode_p)
protected Map createValueMap(Node valueNode_p)
valueNode_p - Node with child value nodespublic void setLocaleFromContext(OwMainAppContext mainContext_p)
mainContext_p - public Locale getLocaleFromContext()
public void insertLabel(Writer w_p) throws Exception
insertLabel in class OwSettingsPropertyControlExceptionprotected void insertLabelValue(Writer w_p, String displayName, String strID_p) throws IOException
IOExceptionCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.