|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.magnolia.ui.form.AbstractFormItem
info.magnolia.ui.form.field.factory.AbstractFieldFactory<D,T>
D
- definition typeT
- field value typepublic abstract class AbstractFieldFactory<D extends FieldDefinition,T>
Abstract FieldFactory implementations. This class handle all common attributes defined in FieldDefinition
and binds Vaadin Field
instances created
by subclasses to the Property
they will be reading and writing to.
Field Summary | |
---|---|
protected D |
definition
|
protected com.vaadin.ui.Field<T> |
field
|
protected com.vaadin.data.Item |
item
|
Constructor Summary | |
---|---|
AbstractFieldFactory(D definition,
com.vaadin.data.Item relatedFieldItem)
|
Method Summary | |
---|---|
com.vaadin.ui.Field<T> |
createField()
Creates and initializes a Vaadin Field component. |
protected abstract com.vaadin.ui.Field<T> |
createFieldComponent()
Implemented by subclasses to create and initialize the Vaadin Field instance to use. |
protected Class<?> |
getDefaultFieldType(FieldDefinition fieldDefinition)
|
D |
getFieldDefinition()
|
protected Class<?> |
getFieldType(FieldDefinition fieldDefinition)
Return the Class field Type if define in the configuration. |
protected String |
getI18nBasename()
|
protected com.vaadin.data.Property<?> |
getOrCreateProperty()
Get a property from the current Item. |
String |
getPropertyName()
|
protected javax.jcr.Node |
getRelatedNode(com.vaadin.data.Item fieldRelatedItem)
Returns the field related node. |
info.magnolia.ui.api.view.View |
getView()
|
void |
setComponentProvider(info.magnolia.objectfactory.ComponentProvider componentProvider)
|
void |
setFieldValidatorFactoryFactory(FieldValidatorFactoryFactory fieldValidatorFactoryFactory)
|
void |
setI18nContentSupport(info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport)
|
void |
setPropertyDataSource(com.vaadin.data.Property<?> property)
Set the DataSource of the current field. |
Methods inherited from class info.magnolia.ui.form.AbstractFormItem |
---|
getMessage, getMessages, getParent, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface info.magnolia.ui.form.FormItem |
---|
getMessages, getParent, setParent |
Field Detail |
---|
protected com.vaadin.data.Item item
protected com.vaadin.ui.Field<T> field
protected D extends FieldDefinition definition
Constructor Detail |
---|
public AbstractFieldFactory(D definition, com.vaadin.data.Item relatedFieldItem)
Method Detail |
---|
public void setFieldValidatorFactoryFactory(FieldValidatorFactoryFactory fieldValidatorFactoryFactory)
setFieldValidatorFactoryFactory
in interface FieldFactory
public void setI18nContentSupport(info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport)
setI18nContentSupport
in interface FieldFactory
public com.vaadin.ui.Field<T> createField()
FieldFactory
Field
component.
createField
in interface FieldFactory
public D getFieldDefinition()
getFieldDefinition
in interface FieldFactory
public void setPropertyDataSource(com.vaadin.data.Property<?> property)
protected abstract com.vaadin.ui.Field<T> createFieldComponent()
public info.magnolia.ui.api.view.View getView()
getView
in interface FieldFactory
protected com.vaadin.data.Property<?> getOrCreateProperty()
if the field is i18n-aware - create a special property that would delegate the values to the proper localized properties. Otherwise - follow the default pattern.
If the property already exists, return this property. If the property does not exist, create a new property based on the defined type, default value, and saveInfo.
protected Class<?> getFieldType(FieldDefinition fieldDefinition)
IllegalArgumentException
:
protected Class<?> getDefaultFieldType(FieldDefinition fieldDefinition)
protected javax.jcr.Node getRelatedNode(com.vaadin.data.Item fieldRelatedItem) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public String getPropertyName()
protected String getI18nBasename()
getI18nBasename
in class AbstractFormItem
public void setComponentProvider(info.magnolia.objectfactory.ComponentProvider componentProvider)
setComponentProvider
in interface FieldFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |