info.magnolia.ui.form.field.factory
Class CheckBoxFieldFactory

java.lang.Object
  extended by info.magnolia.ui.form.AbstractFormItem
      extended by info.magnolia.ui.form.field.factory.AbstractFieldFactory<CheckboxFieldDefinition,Boolean>
          extended by info.magnolia.ui.form.field.factory.CheckBoxFieldFactory
All Implemented Interfaces:
FieldFactory, FormItem

public class CheckBoxFieldFactory
extends AbstractFieldFactory<CheckboxFieldDefinition,Boolean>

Creates and initializes a checkBox field based on a field definition.


Field Summary
 
Fields inherited from class info.magnolia.ui.form.field.factory.AbstractFieldFactory
definition, field, item
 
Constructor Summary
CheckBoxFieldFactory(CheckboxFieldDefinition definition, com.vaadin.data.Item relatedFieldItem)
           
 
Method Summary
protected  com.vaadin.ui.Field<Boolean> createFieldComponent()
          Implemented by subclasses to create and initialize the Vaadin Field instance to use.
protected  Class<?> getDefaultFieldType()
          Exposed method used by field's factory in order to define a default Field Type (decoupled from the definition).
 void setPropertyDataSourceAndDefaultValue(com.vaadin.data.Property<?> property)
          Set the DataSource of the current field.
Set the default value if :
- the item is an instance of ItemAdapter and this is a new Item (Not yet stored in the related datasource).
- the item is not an instance of ItemAdapter.
In this case, the Item is a custom implementation of Item and we have no possibility to define if it is or not a new Item.
 
Methods inherited from class info.magnolia.ui.form.field.factory.AbstractFieldFactory
createDefaultValue, createField, getDefinitionType, getFieldDefinition, getFieldType, getI18nBasename, getView, initializeConverter, initializeTransformer, setComponentProvider, setFieldValidatorFactoryFactory, setI18nContentSupport, setPropertyDataSourceDefaultValue
 
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
 

Constructor Detail

CheckBoxFieldFactory

public CheckBoxFieldFactory(CheckboxFieldDefinition definition,
                            com.vaadin.data.Item relatedFieldItem)
Method Detail

createFieldComponent

protected com.vaadin.ui.Field<Boolean> createFieldComponent()
Description copied from class: AbstractFieldFactory
Implemented by subclasses to create and initialize the Vaadin Field instance to use.

Specified by:
createFieldComponent in class AbstractFieldFactory<CheckboxFieldDefinition,Boolean>

getDefaultFieldType

protected Class<?> getDefaultFieldType()
Description copied from class: AbstractFieldFactory
Exposed method used by field's factory in order to define a default Field Type (decoupled from the definition).

Overrides:
getDefaultFieldType in class AbstractFieldFactory<CheckboxFieldDefinition,Boolean>

setPropertyDataSourceAndDefaultValue

public void setPropertyDataSourceAndDefaultValue(com.vaadin.data.Property<?> property)
Description copied from class: AbstractFieldFactory
Set the DataSource of the current field.
Set the default value if :
- the item is an instance of ItemAdapter and this is a new Item (Not yet stored in the related datasource).
- the item is not an instance of ItemAdapter.
In this case, the Item is a custom implementation of Item and we have no possibility to define if it is or not a new Item.

Overrides:
setPropertyDataSourceAndDefaultValue in class AbstractFieldFactory<CheckboxFieldDefinition,Boolean>


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.