|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.riotfamily.riot.editor.AbstractEditorDefinition
org.riotfamily.riot.editor.AbstractObjectEditorDefinition
public abstract class AbstractObjectEditorDefinition
Abstract base class for editors that display a single object.
FormDefinition
,
ViewDefinition
Constructor Summary | |
---|---|
AbstractObjectEditorDefinition()
|
Method Summary | |
---|---|
void |
addChildEditorDefinition(EditorDefinition editorDef)
|
EditorReference |
createEditorPath(Object bean,
MessageResolver messageResolver)
Returns a PathComponent for the given bean that represents the complete path to the form. |
EditorReference |
createEditorPath(String objectId,
String parentId,
String parentEditorId,
MessageResolver messageResolver)
Returns a PathComponent for the given objectId and parentId that represents the complete path to the form. |
protected EditorReference |
createPathComponent(Object bean,
String parentId,
String parentEditorId,
MessageResolver messageResolver)
Creates a PathComponent for the given bean (or parentId). |
EditorReference |
createReference(String objectId,
MessageResolver messageResolver)
Creates a reference to an editor. |
Class<?> |
getBeanClass()
|
List<EditorDefinition> |
getChildEditorDefinitions()
|
List<EditorReference> |
getChildEditorReferences(Object object,
MessageResolver messageResolver)
|
String |
getEditorUrl(String objectId,
String parentId,
String parentEditorId)
|
protected String |
getEditorUrlWithinServlet(String objectId,
String parentId)
|
protected abstract String |
getEditorUrlWithinServlet(String objectId,
String parentId,
String parentEditorId)
|
String |
getLabel(Object object,
MessageResolver messageResolver)
|
protected String |
getLabelProperty()
|
protected Object |
loadBean(String objectId)
|
void |
setBeanClass(Class<?> beanClass)
|
void |
setLabelProperty(String labelProperty)
|
Methods inherited from class org.riotfamily.riot.editor.AbstractEditorDefinition |
---|
addReference, equals, getDefaultName, getEditorRepository, getIcon, getId, getLabel, getMessageKey, getName, getParentEditorDefinition, hashCode, isHidden, setEditorRepository, setHidden, setIcon, setId, setName, setParentEditorDefinition, show |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.riotfamily.riot.editor.EditorDefinition |
---|
addReference, getEditorType, getId, getParentEditorDefinition, isHidden, setParentEditorDefinition, show |
Constructor Detail |
---|
public AbstractObjectEditorDefinition()
Method Detail |
---|
public Class<?> getBeanClass()
getBeanClass
in interface EditorDefinition
getBeanClass
in class AbstractEditorDefinition
public void setBeanClass(Class<?> beanClass)
public void setLabelProperty(String labelProperty)
protected String getLabelProperty()
public String getLabel(Object object, MessageResolver messageResolver)
getLabel
in interface EditorDefinition
getLabel
in class AbstractEditorDefinition
public List<EditorDefinition> getChildEditorDefinitions()
getChildEditorDefinitions
in interface ObjectEditorDefinition
public List<EditorReference> getChildEditorReferences(Object object, MessageResolver messageResolver)
getChildEditorReferences
in interface ObjectEditorDefinition
public void addChildEditorDefinition(EditorDefinition editorDef)
addChildEditorDefinition
in interface ObjectEditorDefinition
protected Object loadBean(String objectId)
public EditorReference createEditorPath(String objectId, String parentId, String parentEditorId, MessageResolver messageResolver)
createEditorPath
in interface EditorDefinition
objectId
- Id of the object to be edited or null
if a
form for a new object is requestedparentId
- Id of the the parent object or null
if
either an existing object is to be edited or the form belongs to a
root listpublic EditorReference createEditorPath(Object bean, MessageResolver messageResolver)
createEditorPath
in interface EditorDefinition
protected EditorReference createPathComponent(Object bean, String parentId, String parentEditorId, MessageResolver messageResolver)
getParent()
will
always return null
.
bean
- The bean to be edited or null
if a form for a
new (unsaved) object is requested.parentId
- Id of the the parent object or null
if
either an existing object is to be edited or the form belongs to a
root listparentEditorId
- Id of the parent editor or null
if
no parentId is specifiedpublic EditorReference createReference(String objectId, MessageResolver messageResolver)
EditorDefinition
EditorGroupController
.
createReference
in interface EditorDefinition
public String getEditorUrl(String objectId, String parentId, String parentEditorId)
getEditorUrl
in interface EditorDefinition
protected final String getEditorUrlWithinServlet(String objectId, String parentId)
protected abstract String getEditorUrlWithinServlet(String objectId, String parentId, String parentEditorId)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |