|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.beans.PropertyEditorRegistrySupport
org.riotfamily.forms.AbstractEditorBinder
public abstract class AbstractEditorBinder
This class is used to bind a form element to the property of a bean. The
form element must implement the Editor
interface.
| Constructor Summary | |
|---|---|
AbstractEditorBinder()
|
|
| Method Summary | |
|---|---|
void |
bind(Editor editor,
String property)
Binds the given editor to the property with the specified name. |
protected Editor |
findEditorByProperty(String property)
|
Map<String,EditorBinding> |
getBindings()
|
String[] |
getBoundProperties()
Returns the names of all properties an editor is bound to. |
Editor |
getEditor(String property)
Returns the editor that is bound to the given property. |
PropertyEditor |
getPropertyEditor(Class<?> type,
String propertyPath)
|
protected String |
getPropertyPath(Editor editor,
String property)
|
abstract Class<?> |
getPropertyType(String path)
|
void |
initEditors()
Initializes each editor with the property value it is bound to or null |
Object |
populateBackingObject()
Sets the properties of the backingObject to the values provided by the corresponding editor. |
void |
registerPropertyEditors(PropertyEditorRegistrar[] registrars)
|
EditorBinder |
replace(EditorBinder previousBinder)
|
void |
setBackingObject(Object backingObject)
|
protected void |
setBackingObjectInternal(Object backingObject)
|
| Methods inherited from class org.springframework.beans.PropertyEditorRegistrySupport |
|---|
copyCustomEditorsTo, copyDefaultEditorsTo, findCustomEditor, getDefaultEditor, guessPropertyTypeFromEditors, hasCustomEditorForElement, isSharedEditor, registerCustomEditor, registerCustomEditor, registerDefaultEditors, registerSharedEditor, useConfigValueEditors |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.riotfamily.forms.EditorBinder |
|---|
getBackingObject, getBeanClass, getPropertyValue, isEditingExistingBean, setPropertyValue |
| Methods inherited from interface org.springframework.beans.PropertyEditorRegistry |
|---|
findCustomEditor, registerCustomEditor, registerCustomEditor |
| Constructor Detail |
|---|
public AbstractEditorBinder()
| Method Detail |
|---|
public abstract Class<?> getPropertyType(String path)
getPropertyType in interface EditorBindergetPropertyType in class PropertyEditorRegistrySupportpublic Map<String,EditorBinding> getBindings()
getBindings in interface EditorBinderpublic EditorBinder replace(EditorBinder previousBinder)
replace in interface EditorBinder
public void bind(Editor editor,
String property)
EditorBinder
bind in interface EditorBindereditor - the editor to bindproperty - the name of the property the editor is to be bound topublic Editor getEditor(String property)
EditorBinder
getEditor in interface EditorBinderprotected Editor findEditorByProperty(String property)
public String[] getBoundProperties()
EditorBinder
getBoundProperties in interface EditorBinderpublic void registerPropertyEditors(PropertyEditorRegistrar[] registrars)
registerPropertyEditors in interface EditorBinderpublic final void setBackingObject(Object backingObject)
setBackingObject in interface EditorBinderprotected void setBackingObjectInternal(Object backingObject)
public void initEditors()
EditorBindernull if the backingObject is not set.
- Specified by:
initEditors in interface EditorBinder
- See Also:
Editor.setValue(Object)
public Object populateBackingObject()
EditorBindernull a new
instance is created.
populateBackingObject in interface EditorBinder
public PropertyEditor getPropertyEditor(Class<?> type,
String propertyPath)
getPropertyEditor in interface EditorBinder
protected String getPropertyPath(Editor editor,
String property)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||