|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.component.form.FormBuilderBase
public class FormBuilderBase
Base class for form builder engines.
Field Summary | |
---|---|
protected static org.slf4j.Logger |
LOG
|
Constructor Summary | |
---|---|
FormBuilderBase()
|
|
FormBuilderBase(java.lang.Class<T> clz,
IReadOnlyModel<T> mdl)
Constructor to immediately initialize for a given class and reader. |
|
FormBuilderBase(T instance)
Initialize with a single unchangeable instance. |
Method Summary | ||
---|---|---|
protected ControlFactoryResult |
createControlFor(IReadOnlyModel<?> model,
PropertyMetaModel<?> pmm,
boolean editable)
|
|
protected ControlFactoryResult |
createControlFor(IReadOnlyModel<?> model,
PropertyMetaModel<?> pmm,
boolean editable,
java.lang.Object context)
Create the optimal control for the specified thingy, and return the binding for it. |
|
ModelBindings |
getBindings()
|
|
ControlBuilder |
getBuilder()
|
|
protected ClassMetaModel |
getClassMeta()
Return the currently active class metamodel (the model that properties are obtained from). |
|
java.lang.Object |
getContext()
|
|
IControlLabelFactory |
getControlLabelFactory()
Return the factory to use for creating control labels from metadata. |
|
java.lang.Class<?> |
getCurrentInputClass()
|
|
IReadOnlyModel<?> |
getModel()
Return the current ReadOnlyModel which is the accessor to get the instance that will be edited. |
|
protected PropertyMetaModel<?> |
resolveProperty(java.lang.String name)
Find a property relative to the current input class. |
|
protected AccessCalculator |
rights()
Access the shared permissions calculator. |
|
void |
setBindings(ModelBindings bindings)
|
|
|
setClassModel(java.lang.Class<T> clz,
IReadOnlyModel<T> mdl)
Set or change the current base class and base model. |
|
void |
setContext(java.lang.Object context)
|
|
void |
setControlLabelFactory(IControlLabelFactory controlLabelFactory)
|
|
|
setInstance(T instance)
|
|
void |
setMetaModel(ClassMetaModel cmm,
IReadOnlyModel<?> source)
Sets the base metamodel and value source to use for obtaining properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.slf4j.Logger LOG
Constructor Detail |
---|
public FormBuilderBase()
public FormBuilderBase(java.lang.Class<T> clz, IReadOnlyModel<T> mdl)
T
- clz
- mdl
- public FormBuilderBase(T instance)
T
- instance
- Method Detail |
---|
public final ControlBuilder getBuilder()
protected ControlFactoryResult createControlFor(IReadOnlyModel<?> model, PropertyMetaModel<?> pmm, boolean editable, java.lang.Object context)
container
- This will receive all nodes forming the control.model
- The content model used to obtain the Object instance whose property is being edited, for binding purposes.pmm
- The property meta for the property to find an editor for.editable
- When false this must make a displayonly control.
protected ControlFactoryResult createControlFor(IReadOnlyModel<?> model, PropertyMetaModel<?> pmm, boolean editable)
protected AccessCalculator rights()
public java.lang.Object getContext()
public void setContext(java.lang.Object context)
public <T> void setClassModel(java.lang.Class<T> clz, IReadOnlyModel<T> mdl)
T
- clz
- mdl
- public void setMetaModel(ClassMetaModel cmm, IReadOnlyModel<?> source)
cmm
- source
- public <T> void setInstance(T instance)
protected ClassMetaModel getClassMeta()
protected PropertyMetaModel<?> resolveProperty(java.lang.String name)
name
-
public IReadOnlyModel<?> getModel()
public java.lang.Class<?> getCurrentInputClass()
public ModelBindings getBindings()
public void setBindings(ModelBindings bindings)
public IControlLabelFactory getControlLabelFactory()
public void setControlLabelFactory(IControlLabelFactory controlLabelFactory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |