| 1 24 package org.riotfamily.forms.element.collection; 25 26 import java.beans.PropertyEditor ; 27 28 import org.riotfamily.forms.Editor; 29 import org.riotfamily.forms.EditorBinder; 30 import org.riotfamily.forms.EditorBinding; 31 32 33 34 public class CollectionItemEditorBinding implements EditorBinding { 35 36 private Editor editor; 37 38 private Object value; 39 40 public CollectionItemEditorBinding(Editor editor, Object value) { 41 this.editor = editor; 42 this.value = value; 43 } 44 45 public Class getBeanClass() { 46 return value != null ? value.getClass() : null; 47 } 48 49 public Editor getEditor() { 50 return editor; 51 } 52 53 public EditorBinder getEditorBinder() { 54 return null; 55 } 56 57 public String getProperty() { 58 return null; 59 } 60 61 public PropertyEditor getPropertyEditor() { 62 return null; 63 } 64 65 public String getPropertyPath() { 66 return "[" + editor.getId() + "]"; 67 } 68 69 public Class getPropertyType() { 70 return Object .class; 71 } 72 73 public Object getValue() { 74 return value; 75 } 76 77 78 } | Popular Tags |