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_strSetName
ITEM_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, toString
attach, detach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest
protected 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 OwSettingsPropertyControl
oSingleValue_p
- single Object valuepublic boolean isModified()
isModified
in class OwSettingsPropertyControl
public void saved()
protected Object getDefaultListItemValue() throws Exception
Exception
public 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 OwEventTarget
request_p
- HttpServletRequestfSave_p
- boolean true = save the changes of the form data, false = just update the form data, but do not saveException
public String getSafePropertyError()
getSafePropertyError
in class OwSettingsPropertyControl
public boolean hasError()
OwSettingsPropertyControl
hasError
in class OwSettingsPropertyControl
OwSettingsPropertyControl.hasError()
public String getPropertyError()
OwSettingsPropertyControl
getPropertyError
in class OwSettingsPropertyControl
OwSettingsPropertyControl.getPropertyError()
public void insertFormField(Writer w_p) throws Exception
insertFormField
in class OwSettingsPropertyControl
w_p
- Writer to write HTML code toException
public void onDelete(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public void onAdd(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequestException
public void setDefault()
OwSettingsProperty
public 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 OwSettingsProperty
init
in class OwAbstractSettingsPropertyControl
propertyDefinitionNode_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 createdException
protected 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 OwSettingsPropertyControl
Exception
protected void insertLabelValue(Writer w_p, String displayName, String strID_p) throws IOException
IOException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.