org.riotfamily.forms
Interface EditorBinder

All Superinterfaces:
PropertyEditorRegistry
All Known Implementing Classes:
AbstractEditorBinder, BeanEditorBinder, ContentContainerEditorBinder, ContentEditorBinder, LocalizedEditorBinder, MapEditorBinder, PagePropertiesEditorBinder

public interface EditorBinder
extends PropertyEditorRegistry

Since:
7.0
Author:
Felix Gnass [fgnass at neteye dot de]

Method Summary
 void bind(Editor editor, String property)
          Binds the given editor to the property with the specified name.
 Object getBackingObject()
           
 Class<?> getBeanClass()
           
 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)
           
 Class<?> getPropertyType(String property)
           
 Object getPropertyValue(String property)
           
 void initEditors()
          Initializes each editor with the property value it is bound to or null if the backingObject is not set.
 boolean isEditingExistingBean()
           
 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)
           
 void setPropertyValue(String property, Object value)
           
 
Methods inherited from interface org.springframework.beans.PropertyEditorRegistry
findCustomEditor, registerCustomEditor, registerCustomEditor
 

Method Detail

getBindings

Map<String,EditorBinding> getBindings()

replace

EditorBinder replace(EditorBinder previousBinder)

getBeanClass

Class<?> getBeanClass()

getBackingObject

Object getBackingObject()

setBackingObject

void setBackingObject(Object backingObject)

isEditingExistingBean

boolean isEditingExistingBean()

getPropertyValue

Object getPropertyValue(String property)

setPropertyValue

void setPropertyValue(String property,
                      Object value)

getPropertyType

Class<?> getPropertyType(String property)

getPropertyEditor

PropertyEditor getPropertyEditor(Class<?> type,
                                 String propertyPath)

bind

void bind(Editor editor,
          String property)
Binds the given editor to the property with the specified name.

Parameters:
editor - the editor to bind
property - the name of the property the editor is to be bound to

getEditor

Editor getEditor(String property)
Returns the editor that is bound to the given property.


getBoundProperties

String[] getBoundProperties()
Returns the names of all properties an editor is bound to.

Since:
6.4

initEditors

void initEditors()
Initializes each editor with the property value it is bound to or null if the backingObject is not set.

See Also:
Editor.setValue(Object)

populateBackingObject

Object populateBackingObject()
Sets the properties of the backingObject to the values provided by the corresponding editor. If the backingObject is null a new instance is created.

Returns:
the populated backingObject

registerPropertyEditors

void registerPropertyEditors(PropertyEditorRegistrar[] registrars)