org.riotfamily.riot.editor
Class FormChooserDefinition

java.lang.Object
  extended by org.riotfamily.riot.editor.AbstractEditorDefinition
      extended by org.riotfamily.riot.editor.AbstractObjectEditorDefinition
          extended by org.riotfamily.riot.editor.FormDefinition
              extended by org.riotfamily.riot.editor.FormChooserDefinition
All Implemented Interfaces:
Cloneable, EditorDefinition, FormReference, ObjectEditorDefinition

public class FormChooserDefinition
extends FormDefinition


Nested Class Summary
protected static class FormChooserDefinition.FormDefinitionComparator
           
 
Field Summary
 
Fields inherited from class org.riotfamily.riot.editor.FormDefinition
TYPE_FORM
 
Constructor Summary
FormChooserDefinition(EditorRepository editorRepository)
           
 
Method Summary
 void addChildEditorDefinition(EditorDefinition editorDef)
           
 void addFormDefinition(FormDefinition formDef)
           
 Collection<FormOption> createOptions(String parentId, MessageResolver messageResolver)
           
 Class<?> getBeanClass()
           
protected  String getDefaultName()
           
 String getEditorUrl(String objectId, String parentId, String parentEditorId)
           
protected  FormDefinition getFormDefinition(String objectId)
           
protected  FormDefinition getFormDefinitionByDiscriminator(Object bean)
           
 String getFormId()
           
protected  FormDefinition getNearestFormDefintionByClass(Object bean)
           
 void setDiscriminatorProperty(String discriminatorProperty)
           
 void setParentEditorDefinition(EditorDefinition editorDef)
           
 
Methods inherited from class org.riotfamily.riot.editor.FormDefinition
getDiscriminatorValue, getEditorType, getEditorUrlWithinServlet, setDiscriminatorValue, setFormId, setId
 
Methods inherited from class org.riotfamily.riot.editor.AbstractObjectEditorDefinition
createEditorPath, createEditorPath, createPathComponent, createReference, getChildEditorDefinitions, getChildEditorReferences, getEditorUrlWithinServlet, getLabel, getLabelProperty, loadBean, setBeanClass, setLabelProperty
 
Methods inherited from class org.riotfamily.riot.editor.AbstractEditorDefinition
addReference, equals, getEditorRepository, getIcon, getId, getLabel, getMessageKey, getName, getParentEditorDefinition, hashCode, isHidden, setEditorRepository, setHidden, setIcon, setName, 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, getId, getParentEditorDefinition, isHidden, show
 

Constructor Detail

FormChooserDefinition

public FormChooserDefinition(EditorRepository editorRepository)
Method Detail

setDiscriminatorProperty

public void setDiscriminatorProperty(String discriminatorProperty)

addFormDefinition

public void addFormDefinition(FormDefinition formDef)

getFormId

public String getFormId()
Specified by:
getFormId in interface FormReference
Overrides:
getFormId in class FormDefinition

getBeanClass

public Class<?> getBeanClass()
Specified by:
getBeanClass in interface EditorDefinition
Overrides:
getBeanClass in class FormDefinition

getDefaultName

protected String getDefaultName()
Overrides:
getDefaultName in class FormDefinition

getFormDefinition

protected FormDefinition getFormDefinition(String objectId)

setParentEditorDefinition

public void setParentEditorDefinition(EditorDefinition editorDef)
Specified by:
setParentEditorDefinition in interface EditorDefinition
Overrides:
setParentEditorDefinition in class AbstractEditorDefinition

addChildEditorDefinition

public void addChildEditorDefinition(EditorDefinition editorDef)
Specified by:
addChildEditorDefinition in interface ObjectEditorDefinition
Overrides:
addChildEditorDefinition in class AbstractObjectEditorDefinition

getFormDefinitionByDiscriminator

protected FormDefinition getFormDefinitionByDiscriminator(Object bean)

getNearestFormDefintionByClass

protected FormDefinition getNearestFormDefintionByClass(Object bean)

getEditorUrl

public String getEditorUrl(String objectId,
                           String parentId,
                           String parentEditorId)
Specified by:
getEditorUrl in interface EditorDefinition
Overrides:
getEditorUrl in class AbstractObjectEditorDefinition

createOptions

public Collection<FormOption> createOptions(String parentId,
                                            MessageResolver messageResolver)