com.vaadin.ui
Class Form

java.lang.Object
  extended by com.vaadin.terminal.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractField<Object>
              extended by com.vaadin.ui.Form
All Implemented Interfaces:
Buffered, BufferedValidatable, Item, Item.Editor, Item.Viewer, Property<Object>, Property.Editor, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, Action.Container, Action.Notifier, Action.ShortcutNotifier, MethodEventSource, Connector, ClientConnector, RpcTarget, Sizeable, Vaadin6Component, VariableOwner, Component, Component.Focusable, Field<Object>, HasComponents, Serializable, Iterable<Component>, EventListener

Deprecated. Use FieldGroup instead of Form for more flexibility.

@Deprecated
public class Form
extends AbstractField<Object>
implements Item.Editor, Buffered, Item, Validatable, Action.Notifier, HasComponents, Vaadin6Component

Form component provides easy way of creating and managing sets fields.

Form is a container for fields implementing Field interface. It provides support for any layouts and provides buffering interface for easy connection of commit and discard buttons. All the form fields can be customized by adding validators, setting captions and icons, setting immediateness, etc. Also direct mechanism for replacing existing fields with selections is given.

Form provides customizable editor for classes implementing Item interface. Also the form itself implements this interface for easier connectivity to other items. To use the form as editor for an item, just connect the item to form with setItemDataSource(Item). If only a part of the item needs to be edited, setItemDataSource(Item,Collection) can be used instead. After the item has been connected to the form, the automatically created fields can be customized and new fields can be added. If you need to connect a class that does not implement Item interface, most properties of any class following bean pattern, can be accessed trough BeanItem.

Since:
3.0
Version:
7.0.0.alpha3
Author:
Vaadin Ltd.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler
 
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered
Buffered.SourceException
 
Nested classes/interfaces inherited from interface com.vaadin.data.Item
Item.Editor, Item.PropertySetChangeEvent, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer
 
Nested classes/interfaces inherited from interface com.vaadin.terminal.VariableOwner
VariableOwner.ErrorEvent
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.terminal.Sizeable
Sizeable.Unit
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Field
Field.ValueChangeEvent
 
Nested classes/interfaces inherited from interface com.vaadin.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
 
Field Summary
 
Fields inherited from interface com.vaadin.terminal.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
Form()
          Deprecated. Constructs a new form with default layout.
Form(Layout formLayout)
          Deprecated. Constructs a new form with given Layout.
Form(Layout formLayout, FormFieldFactory fieldFactory)
          Deprecated. Constructs a new form with given Layout and FormFieldFactory.
 
Method Summary
<T extends Action & Action.Listener>
void
addAction(T action)
          Deprecated.  
 void addActionHandler(Action.Handler actionHandler)
          Deprecated. Registers a new action handler for this container
 void addField(Object propertyId, Field<?> field)
          Deprecated. Registers the field with the form and adds the field to the form layout.
 boolean addItemProperty(Object id, Property property)
          Deprecated. Adds a new property to form and create corresponding field.
 void addValidator(Validator validator)
          Deprecated. Adding validators directly to form is not supported.
protected  void attachField(Object propertyId, Field field)
          Deprecated. Adds the field to the form layout.
protected  void bindPropertyToField(Object propertyId, Property property, Field field)
          Deprecated. Binds an item property to a field.
 void changeVariables(Object source, Map<String,Object> variables)
          Deprecated. Called when one or more variables handled by the implementing class are changed.
 void commit()
          Deprecated. Updates all changes since the previous commit to the data source.
protected  void detachField(Field field)
          Deprecated. Called when a form field is detached from a Form.
 void discard()
          Deprecated. Discards all changes since last commit.
 void focus()
          Deprecated. Focuses the first field in the form.
 int getComponentCount()
          Deprecated.  
 Iterator<Component> getComponentIterator()
          Deprecated. Gets an iterator to the collection of contained components.
 ErrorMessage getErrorMessage()
          Deprecated. The error message of a Form is the error of the first field with a non-empty error.
 Field<?> getField(Object propertyId)
          Deprecated. Gets the field identified by the propertyid.
 Layout getFooter()
          Deprecated. Returns a layout that is rendered below normal form contents.
 FormFieldFactory getFormFieldFactory()
          Deprecated. Get the field factory of the form.
 Item getItemDataSource()
          Deprecated. Gets the Item serving as the data source of the viewer.
 Property<?> getItemProperty(Object id)
          Deprecated. The property identified by the property id.
 Collection<?> getItemPropertyIds()
          Deprecated. Gets the collection of IDs of all Properties stored in the Item.
 Layout getLayout()
          Deprecated. Gets the layout of the form.
protected  ActionManager getOwnActionManager()
          Deprecated. Gets the ActionManager responsible for handling Actions added to this Form.
Note that Form has another ActionManager inherited from AbstractField.
 FormState getState()
          Deprecated. Returns the shared state bean with information to be sent from the server to the client.
 Class<?> getType()
          Deprecated. Gets the field type.
 Collection<?> getVisibleItemProperties()
          Deprecated. Returns the visibleProperties.
 boolean isComponentVisible(Component childComponent)
          Deprecated. Checks if the child component is visible.
protected  boolean isEmpty()
          Deprecated. Form is empty if all of its fields are empty.
 boolean isInvalidAllowed()
          Deprecated. Checks the validabtable object accept invalid values.
 boolean isModified()
          Deprecated. Tests if the value stored in the object has been modified since it was last updated from the data source.
 boolean isReadThrough()
          Deprecated. 
 boolean isValidationVisibleOnCommit()
          Deprecated. Is validation made automatically visible on commit? See setValidationVisibleOnCommit().
 boolean isWriteThrough()
          Deprecated. 
 Iterator<Component> iterator()
          Deprecated.  
 void paintContent(PaintTarget target)
          Deprecated.  Paints the Paintable into a UIDL stream.
<T extends Action & Action.Listener>
void
removeAction(T action)
          Deprecated.  
 void removeActionHandler(Action.Handler actionHandler)
          Deprecated. Removes a previously registered action handler for the contents of this container.
 void removeAllActionHandlers()
          Deprecated. Removes all action handlers
 boolean removeAllProperties()
          Deprecated. Removes all properties and fields from the form.
 boolean removeItemProperty(Object id)
          Deprecated. Removes the property and corresponding field from the form.
 AbstractSelect replaceWithSelect(Object propertyId, Object[] values, Object[] descriptions)
          Deprecated. Sets the form field to be selectable from static list of changes.
 void setEnabled(boolean enabled)
          Deprecated. Enables or disables the component.
 void setFooter(Layout footer)
          Deprecated. Sets the layout that is rendered below normal form contents.
protected  void setFormDataSource(Object data, Collection<?> properties)
          Deprecated. Updates the internal form datasource.
 void setFormFieldFactory(FormFieldFactory fieldFactory)
          Deprecated. Sets the field factory used by this Form to genarate Fields for properties.
 void setImmediate(boolean immediate)
          Deprecated. Setting the form to be immediate also sets all the fields of the form to the same state.
protected  void setInternalValue(Object newValue)
          Deprecated. Sets the internal value.
 void setInvalidAllowed(boolean invalidValueAllowed)
          Deprecated. Should the validabtable object accept invalid values.
 void setItemDataSource(Item newDataSource)
          Deprecated. Sets the item datasource for the form.
 void setItemDataSource(Item newDataSource, Collection<?> propertyIds)
          Deprecated. Set the item datasource for the form, but limit the form contents to specified properties of the item.
 void setLayout(Layout layout)
          Deprecated. Sets the layout of the form.
 void setReadOnly(boolean readOnly)
          Deprecated. Sets the component's to read-only mode to the specified state.
 void setReadThrough(boolean readThrough)
          Deprecated. Sets the field's read-through mode to the specified status.
 void setTabIndex(int tabIndex)
          Deprecated. Sets the Tabulator index of this Focusable component.
 void setValidationVisibleOnCommit(boolean makeVisible)
          Deprecated. Controls the making validation visible implicitly on commit.
 void setVisibleItemProperties(Collection<?> visibleProperties)
          Deprecated. Sets the visibleProperties.
 void setVisibleItemProperties(Object[] visibleProperties)
          Deprecated. Sets the visibleProperties.
 void setWriteThrough(boolean writeThrough)
          Deprecated. Sets the field's write-through mode to the specified status.
 void validate()
          Deprecated. Checks the validity of the Form and all of its fields.
 
Methods inherited from class com.vaadin.ui.AbstractField
addListener, addListener, attach, detach, fireReadOnlyStatusChange, fireValueChange, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getInternalValue, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, getValue, isBuffered, isInvalidCommitted, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeValidator, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInvalidCommitted, setPropertyDataSource, setRequired, setRequiredError, setValidationVisible, setValue, setValue, shouldHideErrors, toString, updateState, validate, valueChange
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireEvent, getActionManager, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getRoot, getStyle, getStyleName, getWidth, getWidthUnits, handleError, hasListeners, isConnectorEnabled, isEnabled, isImmediate, isVisible, removeListener, removeListener, removeListener, removeListener, removeListener, removeShortcutListener, removeStyleName, requestRepaint, setCaption, setComponentError, setData, setDebugId, setDescription, setErrorHandler, setHeight, setHeight, setIcon, setLocale, setParent, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth
 
Methods inherited from class com.vaadin.terminal.AbstractClientConnector
addExtension, addMethodInvocationToQueue, createState, getAllChildrenIterable, getConnectorId, getExtensions, getRpcManager, getRpcProxy, getStateType, registerRpc, registerRpc, removeExtension, requestRepaintAll, retrievePendingRpcCalls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.vaadin.data.Buffered
isBuffered, setBuffered
 
Methods inherited from interface com.vaadin.data.Validatable
getValidators, isValid, removeValidator
 
Methods inherited from interface com.vaadin.terminal.VariableOwner
isEnabled, isImmediate
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getApplication, getCaption, getDebugId, getIcon, getLocale, getParent, getRoot, getStyleName, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setDebugId, setIcon, setStyleName, setVisible, updateState
 
Methods inherited from interface com.vaadin.terminal.gwt.server.ClientConnector
detach, getExtensions, getStateType, isConnectorEnabled, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setParent
 
Methods inherited from interface com.vaadin.terminal.gwt.client.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.terminal.gwt.server.RpcTarget
getRpcManager
 
Methods inherited from interface com.vaadin.terminal.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth
 
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
 

Constructor Detail

Form

public Form()
Deprecated. 
Constructs a new form with default layout.

By default the form uses FormLayout.


Form

public Form(Layout formLayout)
Deprecated. 
Constructs a new form with given Layout.

Parameters:
formLayout - the layout of the form.

Form

public Form(Layout formLayout,
            FormFieldFactory fieldFactory)
Deprecated. 
Constructs a new form with given Layout and FormFieldFactory.

Parameters:
formLayout - the layout of the form.
fieldFactory - the FieldFactory of the form.
Method Detail

getState

public FormState getState()
Deprecated. 
Description copied from class: AbstractComponent
Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().

Specified by:
getState in interface Connector
Specified by:
getState in interface Component
Overrides:
getState in class AbstractField<Object>
Returns:
updated component shared state

paintContent

public void paintContent(PaintTarget target)
                  throws PaintException
Deprecated. 
Description copied from interface: Vaadin6Component

Paints the Paintable into a UIDL stream. This method creates the UIDL sequence describing it and outputs it to the given UIDL stream.

It is called when the contents of the component should be painted in response to the component first being shown or having been altered so that its visual representation is changed.

Specified by:
paintContent in interface Vaadin6Component
Parameters:
target - the target UIDL stream where the component should paint itself to.
Throws:
PaintException - if the paint operation failed.

changeVariables

public void changeVariables(Object source,
                            Map<String,Object> variables)
Deprecated. 
Description copied from interface: VariableOwner
Called when one or more variables handled by the implementing class are changed.

Specified by:
changeVariables in interface VariableOwner
Parameters:
source - the Source of the variable change. This is the origin of the event. For example in Web Adapter this is the request.
variables - the Mapping from variable names to new variable values.

getErrorMessage

public ErrorMessage getErrorMessage()
Deprecated. 
The error message of a Form is the error of the first field with a non-empty error. Empty error messages of the contained fields are skipped, because an empty error indicator would be confusing to the user, especially if there are errors that have something to display. This is also the reason why the calculation of the error message is separate from validation, because validation fails also on empty errors.

Overrides:
getErrorMessage in class AbstractField<Object>
Returns:
ErrorMessage containing the description of the error state of the component or null, if the component contains no errors. Extending classes should override this method if they support other error message types such as validation errors or buffering errors. The returned error message contains information about all the errors.
See Also:
AbstractComponent.getErrorMessage()

setValidationVisibleOnCommit

public void setValidationVisibleOnCommit(boolean makeVisible)
Deprecated. 
Controls the making validation visible implicitly on commit. Having commit() call setValidationVisible(true) implicitly is the default behaviour. You can disable the implicit setting by setting this property as false. It is useful, because you usually want to start with the form free of errors and only display them after the user clicks Ok. You can disable the implicit setting by setting this property as false.

Parameters:
makeVisible - If true (default), validation is made visible when commit() is called. If false, the visibility is left as it is.

isValidationVisibleOnCommit

public boolean isValidationVisibleOnCommit()
Deprecated. 
Is validation made automatically visible on commit? See setValidationVisibleOnCommit().

Returns:
true if validation is made automatically visible on commit.

commit

public void commit()
            throws Buffered.SourceException,
                   Validator.InvalidValueException
Deprecated. 
Description copied from interface: Buffered
Updates all changes since the previous commit to the data source. The value stored in the object will always be updated into the data source when commit is called.

Specified by:
commit in interface Buffered
Overrides:
commit in class AbstractField<Object>
Throws:
Buffered.SourceException - if the operation fails because of an exception is thrown by the data source. The cause is included in the exception.
Validator.InvalidValueException - if the operation fails because validation is enabled and the values do not validate

discard

public void discard()
             throws Buffered.SourceException
Deprecated. 
Description copied from interface: Buffered
Discards all changes since last commit. The object updates its value from the data source.

Specified by:
discard in interface Buffered
Overrides:
discard in class AbstractField<Object>
Throws:
Buffered.SourceException - if the operation fails because of an exception is thrown by the data source. The cause is included in the exception.

isModified

public boolean isModified()
Deprecated. 
Description copied from interface: Buffered
Tests if the value stored in the object has been modified since it was last updated from the data source.

Specified by:
isModified in interface Buffered
Overrides:
isModified in class AbstractField<Object>
Returns:
true if the value in the object has been modified since the last data source update, false if not.

isReadThrough

@Deprecated
public boolean isReadThrough()
Deprecated. 

Description copied from interface: Buffered
Tests if the object is in read-through mode. If the object is in read-through mode, retrieving its value will result in the value being first updated from the data source to the object.

The only exception to this rule is that when the object is not in write-through mode and it's buffer contains a modified value, the value retrieved from the object will be the locally modified value in the buffer which may differ from the value in the data source.

Specified by:
isReadThrough in interface Buffered
Overrides:
isReadThrough in class AbstractField<Object>
Returns:
true if the object is in read-through mode, false if it's not.

isWriteThrough

@Deprecated
public boolean isWriteThrough()
Deprecated. 

Description copied from interface: Buffered
Tests if the object is in write-through mode. If the object is in write-through mode, all modifications to it will result in commit being called after the modification.

Specified by:
isWriteThrough in interface Buffered
Overrides:
isWriteThrough in class AbstractField<Object>
Returns:
true if the object is in write-through mode, false if it's not.

setReadThrough

public void setReadThrough(boolean readThrough)
Deprecated. 
Description copied from class: AbstractField
Sets the field's read-through mode to the specified status. When switching read-through mode on, the object's value is updated from the data source.

Specified by:
setReadThrough in interface Buffered
Overrides:
setReadThrough in class AbstractField<Object>
Parameters:
readThrough - Boolean value to indicate if the object should be in read-through mode after the call.
See Also:
for an easier way to control read through and write through modes

setWriteThrough

public void setWriteThrough(boolean writeThrough)
                     throws Buffered.SourceException,
                            Validator.InvalidValueException
Deprecated. 
Description copied from class: AbstractField
Sets the field's write-through mode to the specified status. When switching the write-through mode on, a AbstractField.commit() will be performed.

Specified by:
setWriteThrough in interface Buffered
Overrides:
setWriteThrough in class AbstractField<Object>
Parameters:
writeThrough - Boolean value to indicate if the object should be in write-through mode after the call.
Throws:
Buffered.SourceException - If the operation fails because of an exception is thrown by the data source.
Validator.InvalidValueException - If the implicit commit operation fails because of a validation error.
See Also:
for an easier way to control read through and write through modes

addItemProperty

public boolean addItemProperty(Object id,
                               Property property)
Deprecated. 
Adds a new property to form and create corresponding field.

Specified by:
addItemProperty in interface Item
Parameters:
id - ID of the new Property
property - the Property to be added and associated with the id
Returns:
true if the operation succeeded, false if not
See Also:
Item.addItemProperty(Object, Property)

addField

public void addField(Object propertyId,
                     Field<?> field)
Deprecated. 
Registers the field with the form and adds the field to the form layout.

The property id must not be already used in the form.

This field is added to the layout using the attachField(Object, Field) method.

Parameters:
propertyId - the Property id the the field.
field - the field which should be added to the form.

attachField

protected void attachField(Object propertyId,
                           Field field)
Deprecated. 
Adds the field to the form layout.

The field is added to the form layout in the default position (the position used by ComponentContainer.addComponent(Component). If the underlying layout is a CustomLayout the field is added to the CustomLayout location given by the string representation of the property id using CustomLayout.addComponent(Component, String).

Override this method to control how the fields are added to the layout.

Parameters:
propertyId -
field -

getItemProperty

public Property<?> getItemProperty(Object id)
Deprecated. 
The property identified by the property id.

The property data source of the field specified with property id is returned. If there is a (with specified property id) having no data source, the field is returned instead of the data source.

Specified by:
getItemProperty in interface Item
Parameters:
id - identifier of the Property to get
Returns:
the Property with the given ID or null
See Also:
Item.getItemProperty(Object)

getField

public Field<?> getField(Object propertyId)
Deprecated. 
Gets the field identified by the propertyid.

Parameters:
propertyId - the id of the property.

getItemPropertyIds

public Collection<?> getItemPropertyIds()
Deprecated. 
Description copied from interface: Item
Gets the collection of IDs of all Properties stored in the Item.

Specified by:
getItemPropertyIds in interface Item
Returns:
unmodifiable collection containing IDs of the Properties stored the Item

removeItemProperty

public boolean removeItemProperty(Object id)
Deprecated. 
Removes the property and corresponding field from the form.

Specified by:
removeItemProperty in interface Item
Parameters:
id - ID of the Property to be removed
Returns:
true if the operation succeeded
See Also:
Item.removeItemProperty(Object)

detachField

protected void detachField(Field field)
Deprecated. 
Called when a form field is detached from a Form. Typically when a new Item is assigned to Form via setItemDataSource(Item).

Override this method to control how the fields are removed from the layout.

Parameters:
field - the field to be detached from the forms layout.

removeAllProperties

public boolean removeAllProperties()
Deprecated. 
Removes all properties and fields from the form.

Returns:
the Success of the operation. Removal of all fields succeeded if (and only if) the return value is true.

getItemDataSource

public Item getItemDataSource()
Deprecated. 
Description copied from interface: Item.Viewer
Gets the Item serving as the data source of the viewer.

Specified by:
getItemDataSource in interface Item.Viewer
Returns:
data source Item

setItemDataSource

public void setItemDataSource(Item newDataSource)
Deprecated. 
Sets the item datasource for the form.

Setting item datasource clears any fields, the form might contain and adds all the properties as fields to the form.

Specified by:
setItemDataSource in interface Item.Viewer
Parameters:
newDataSource - The new data source Item
See Also:
Item.Viewer.setItemDataSource(Item)

setItemDataSource

public void setItemDataSource(Item newDataSource,
                              Collection<?> propertyIds)
Deprecated. 
Set the item datasource for the form, but limit the form contents to specified properties of the item.

Setting item datasource clears any fields, the form might contain and adds the specified the properties as fields to the form, in the specified order.

See Also:
Item.Viewer.setItemDataSource(Item)

bindPropertyToField

protected void bindPropertyToField(Object propertyId,
                                   Property property,
                                   Field field)
Deprecated. 
Binds an item property to a field. The default behavior is to bind property straight to Field. If Property.Viewer type property (e.g. PropertyFormatter) is already set for field, the property is bound to that Property.Viewer.

Parameters:
propertyId -
property -
field -
Since:
6.7.3

getLayout

public Layout getLayout()
Deprecated. 
Gets the layout of the form.

By default form uses OrderedLayout with form -style.

Returns:
the Layout of the form.

setLayout

public void setLayout(Layout layout)
Deprecated. 
Sets the layout of the form.

If set to null then Form uses a FormLayout by default.

Parameters:
layout - the layout of the form.

replaceWithSelect

public AbstractSelect replaceWithSelect(Object propertyId,
                                        Object[] values,
                                        Object[] descriptions)
Deprecated. 
Sets the form field to be selectable from static list of changes.

The list values and descriptions are given as array. The value-array must contain the current value of the field and the lengths of the arrays must match. Null values are not supported.

Note: since Vaadin 7.0, returns an AbstractSelect instead of a Select.

Parameters:
propertyId - the id of the property.
values -
descriptions -
Returns:
the select property generated

validate

public void validate()
              throws Validator.InvalidValueException
Deprecated. 
Checks the validity of the Form and all of its fields.

Specified by:
validate in interface Validatable
Overrides:
validate in class AbstractField<Object>
Throws:
Validator.InvalidValueException - if the value is not valid
See Also:
Validatable.validate()

isInvalidAllowed

public boolean isInvalidAllowed()
Deprecated. 
Checks the validabtable object accept invalid values.

Specified by:
isInvalidAllowed in interface Validatable
Overrides:
isInvalidAllowed in class AbstractField<Object>
Returns:
true iff the invalid values are allowed.
See Also:
Validatable.isInvalidAllowed()

setInvalidAllowed

public void setInvalidAllowed(boolean invalidValueAllowed)
                       throws UnsupportedOperationException
Deprecated. 
Should the validabtable object accept invalid values.

Specified by:
setInvalidAllowed in interface Validatable
Overrides:
setInvalidAllowed in class AbstractField<Object>
Throws:
UnsupportedOperationException - if the setInvalidAllowed is not supported.
See Also:
Validatable.setInvalidAllowed(boolean)

setReadOnly

public void setReadOnly(boolean readOnly)
Deprecated. 
Sets the component's to read-only mode to the specified state.

Specified by:
setReadOnly in interface Property<Object>
Specified by:
setReadOnly in interface Component
Overrides:
setReadOnly in class AbstractField<Object>
Parameters:
readOnly - a boolean value specifying whether the component is put read-only mode or not
See Also:
Component.setReadOnly(boolean)

setFormFieldFactory

public void setFormFieldFactory(FormFieldFactory fieldFactory)
Deprecated. 
Sets the field factory used by this Form to genarate Fields for properties. FormFieldFactory is used to create fields for form properties. DefaultFieldFactory is used by default.

Parameters:
fieldFactory - the new factory used to create the fields.
See Also:
Field, FormFieldFactory

getFormFieldFactory

public FormFieldFactory getFormFieldFactory()
Deprecated. 
Get the field factory of the form.

Returns:
the FormFieldFactory Factory used to create the fields.

getType

public Class<?> getType()
Deprecated. 
Gets the field type.

Specified by:
getType in interface Property<Object>
Specified by:
getType in class AbstractField<Object>
Returns:
the type of the Field
See Also:
AbstractField.getType()

setInternalValue

protected void setInternalValue(Object newValue)
Deprecated. 
Sets the internal value. This is relevant when the Form is used as Field.

Overrides:
setInternalValue in class AbstractField<Object>
Parameters:
newValue - the new value to be set.
See Also:
AbstractField.setInternalValue(java.lang.Object)

setFormDataSource

protected void setFormDataSource(Object data,
                                 Collection<?> properties)
Deprecated. 
Updates the internal form datasource. Method setFormDataSource.

Parameters:
data -
properties -

getVisibleItemProperties

public Collection<?> getVisibleItemProperties()
Deprecated. 
Returns the visibleProperties.

Returns:
the Collection of visible Item properites.

setVisibleItemProperties

public void setVisibleItemProperties(Collection<?> visibleProperties)
Deprecated. 
Sets the visibleProperties.

Parameters:
visibleProperties - the visibleProperties to set.

setVisibleItemProperties

public void setVisibleItemProperties(Object[] visibleProperties)
Deprecated. 
Sets the visibleProperties.

Parameters:
visibleProperties - the visibleProperties to set.

focus

public void focus()
Deprecated. 
Focuses the first field in the form.

Specified by:
focus in interface Component.Focusable
Overrides:
focus in class AbstractField<Object>
See Also:
Component.Focusable.focus()

setTabIndex

public void setTabIndex(int tabIndex)
Deprecated. 
Sets the Tabulator index of this Focusable component.

Specified by:
setTabIndex in interface Component.Focusable
Overrides:
setTabIndex in class AbstractField<Object>
Parameters:
tabIndex - the tab order of this component. Indexes usually start from 1. Zero means that default tab order should be used. A negative value means that the field should not be included in the tabbing sequence.
See Also:
Component.Focusable.setTabIndex(int)

setImmediate

public void setImmediate(boolean immediate)
Deprecated. 
Setting the form to be immediate also sets all the fields of the form to the same state.

Overrides:
setImmediate in class AbstractComponent
Parameters:
immediate - the boolean value specifying if the component should be in the immediate mode after the call.
See Also:
Component#isImmediate()

isEmpty

protected boolean isEmpty()
Deprecated. 
Form is empty if all of its fields are empty.

Overrides:
isEmpty in class AbstractField<Object>

addValidator

public void addValidator(Validator validator)
Deprecated. 
Adding validators directly to form is not supported. Add the validators to form fields instead.

Specified by:
addValidator in interface Validatable
Overrides:
addValidator in class AbstractField<Object>
Parameters:
validator - the new validator to be added.

getFooter

public Layout getFooter()
Deprecated. 
Returns a layout that is rendered below normal form contents. This area can be used for example to include buttons related to form contents.

Returns:
layout rendered below normal form contents.

setFooter

public void setFooter(Layout footer)
Deprecated. 
Sets the layout that is rendered below normal form contents. Setting this to null will cause an empty HorizontalLayout to be rendered in the footer.

Parameters:
footer - the new footer layout

setEnabled

public void setEnabled(boolean enabled)
Deprecated. 
Description copied from interface: Component
Enables or disables the component. The user can not interact disabled components, which are shown with a style that indicates the status, usually shaded in light gray color. Components are enabled by default.
 Button enabled = new Button("Enabled");
 enabled.setEnabled(true); // The default
 layout.addComponent(enabled);
 
 Button disabled = new Button("Disabled");
 disabled.setEnabled(false);
 layout.addComponent(disabled);
 

This method will trigger a RepaintRequestEvent for the component and, if it is a ComponentContainer, for all its children recursively.

Specified by:
setEnabled in interface Component
Overrides:
setEnabled in class AbstractComponent
Parameters:
enabled - a boolean value specifying if the component should be enabled or not

getOwnActionManager

protected ActionManager getOwnActionManager()
Deprecated. 
Gets the ActionManager responsible for handling Actions added to this Form.
Note that Form has another ActionManager inherited from AbstractField. The ownActionManager handles Actions attached to this Form specifically, while the ActionManager in AbstractField delegates to the containing Window (i.e global Actions).

Returns:

addActionHandler

public void addActionHandler(Action.Handler actionHandler)
Deprecated. 
Description copied from interface: Action.Container
Registers a new action handler for this container

Specified by:
addActionHandler in interface Action.Container
Parameters:
actionHandler - the new handler to be added.

removeActionHandler

public void removeActionHandler(Action.Handler actionHandler)
Deprecated. 
Description copied from interface: Action.Container
Removes a previously registered action handler for the contents of this container.

Specified by:
removeActionHandler in interface Action.Container
Parameters:
actionHandler - the handler to be removed.

removeAllActionHandlers

public void removeAllActionHandlers()
Deprecated. 
Removes all action handlers


addAction

public <T extends Action & Action.Listener> void addAction(T action)
Deprecated. 
Specified by:
addAction in interface Action.Notifier

removeAction

public <T extends Action & Action.Listener> void removeAction(T action)
Deprecated. 
Specified by:
removeAction in interface Action.Notifier

iterator

public Iterator<Component> iterator()
Deprecated. 
Specified by:
iterator in interface Iterable<Component>

getComponentIterator

public Iterator<Component> getComponentIterator()
Deprecated. 
Description copied from interface: HasComponents
Gets an iterator to the collection of contained components. Using this iterator it is possible to step through all components contained in this container.

Specified by:
getComponentIterator in interface HasComponents
Returns:
the component iterator.

getComponentCount

public int getComponentCount()
Deprecated. 

isComponentVisible

public boolean isComponentVisible(Component childComponent)
Deprecated. 
Description copied from interface: HasComponents
Checks if the child component is visible. This method allows hiding a child component from updates and communication to and from the client. This is useful for components that show only a limited number of its children at any given time and want to allow updates only for the children that are visible (e.g. TabSheet has one tab open at a time).

Note that this will prevent updates from reaching the child even though the child itself is set to visible. Also if a child is set to invisible this will not force it to be visible.

Specified by:
isComponentVisible in interface HasComponents
Parameters:
childComponent - The child component to check
Returns:
true if the child component is visible to the user, false otherwise


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.