|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.ow.server.ui.OwEventTarget
com.wewebu.ow.server.app.OwSettingsPropertyControl
com.wewebu.ow.server.settingsimpl.OwSettingsPropertyLanguageString
public class OwSettingsPropertyLanguageString
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
Field Summary | |
---|---|
protected static String |
ITEM_QUERY_KEY
query key for the item parameter for the delete event |
protected Object |
m_defaultValue
default value of property |
protected OwEventTarget |
m_externalFormEventTarget
external form view overrides internal form |
protected String |
m_strError
a error message for this field, if update failed |
protected String |
m_strSetName
set name |
protected Map |
m_value
current value of property |
Fields inherited from interface com.wewebu.ow.server.app.OwSettingsProperty |
---|
ITEM_VALUE_NODE |
Constructor Summary | |
---|---|
OwSettingsPropertyLanguageString()
|
Method Summary | |
---|---|
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 |
String |
getDisplayName()
get display name of property |
String |
getFormName()
get the form used for the edit fields |
OwEventTarget |
getFormTarget()
get the target, that is used for form data and renders form |
String |
getHelpPath()
get optional help path for the control |
Locale |
getLocaleFromContext()
get locale from context |
String |
getName()
get ID of property |
protected Node |
getPropertyDefinitionNode()
get a reference to the property definition node |
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 |
protected void |
init()
init the target after the context is set. |
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 |
boolean |
isEditable()
get flag indicating if property can be edited |
boolean |
isList()
get flag indicating list or scalar value |
boolean |
isModified()
true = value was modified, false otherwise |
boolean |
isUser()
get flag indicating the scope of the property |
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 |
setExternalFormTarget(OwEventTarget eventtarget_p)
override the internal form with an external one, must be called BEFORE event target is attached. |
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 |
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget |
---|
attach, detach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Object m_defaultValue
protected String m_strSetName
protected static final String ITEM_QUERY_KEY
protected Map m_value
protected String m_strError
protected OwEventTarget m_externalFormEventTarget
Constructor Detail |
---|
public OwSettingsPropertyLanguageString()
Method Detail |
---|
protected void init() throws Exception
init
in class OwEventTarget
Exception
public String getHelpPath()
getHelpPath
in class OwSettingsPropertyControl
public Object getValue()
protected Object createSingleClonedValue(Object oSingleValue_p)
createSingleClonedValue
in class OwSettingsPropertyControl
oSingleValue_p
- single Object value
public 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 save
Exception
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 to
Exception
public void onDelete(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequest
Exception
public void onAdd(javax.servlet.http.HttpServletRequest request_p) throws Exception
request_p
- HttpServletRequest
Exception
protected Node getPropertyDefinitionNode()
public void setDefault()
public Node getValueNode(Document doc_p)
doc_p
- DOM Document to add to
public boolean isUser()
public boolean isEditable()
public String getDisplayName()
getDisplayName
in class OwSettingsPropertyControl
public String getName()
public String getFormName()
getFormName
in class OwEventTarget
public void setExternalFormTarget(OwEventTarget eventtarget_p) throws Exception
setExternalFormTarget
in class OwEventTarget
eventtarget_p
- OwEventTarget to be used for form data
Exception
public OwEventTarget getFormTarget()
getFormTarget
in class OwEventTarget
public void init(Node propertyDefinitionNode_p, Node valueNode_p, String strSetName_p) throws Exception
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 created
Exception
protected Object getSingleValue(Node valueNode_p)
protected Map createValueMap(Node valueNode_p)
valueNode_p
- Node with child value nodes
public void setLocaleFromContext(OwMainAppContext mainContext_p)
mainContext_p
- public Locale getLocaleFromContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |