Class Form
-
- All Implemented Interfaces:
Action.Container,Action.Notifier,Action.ShortcutNotifier,ConnectorEventListener,ContextClickEvent.ContextClickNotifier,MethodEventSource,SerializableEventListener,ClientConnector,Sizeable,VariableOwner,com.vaadin.shared.Connector,Component,Component.Focusable,HasComponents,LegacyComponent,Buffered,BufferedValidatable,Item,Item.Editor,Item.Viewer,Property<Object>,Property.Editor,Property.ReadOnlyStatusChangeListener,Property.ReadOnlyStatusChangeNotifier,Property.ValueChangeListener,Property.ValueChangeNotifier,Property.Viewer,Validatable,Field<Object>,Serializable,Iterable<Component>,EventListener
@Deprecated public class Form extends AbstractField<Object> implements Item.Editor, Item, Action.Notifier, HasComponents, LegacyComponent
Deprecated.As of 7.0, useFieldGroupinstead ofFormfor more flexibility.Form component provides easy way of creating and managing sets fields.Formis a container for fields implementingFieldinterface. 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.Formprovides customizable editor for classes implementingIteminterface. 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 withsetItemDataSource(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 implementIteminterface, most properties of any class following bean pattern, can be accessed troughBeanItem.- Since:
- 3.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.v7.ui.AbstractField
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Buffered
Buffered.SourceException
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.v7.ui.Field
Field.ValueChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Item
Item.Editor, Item.PropertySetChangeEvent, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
-
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
-
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
-
Constructor Summary
Constructors Constructor Description Form()Deprecated.Constructs a new form with default layout.Form(Layout formLayout)Deprecated.Constructs a new form with givenLayout.Form(Layout formLayout, FormFieldFactory fieldFactory)Deprecated.Constructs a new form with givenLayoutandFormFieldFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T extends Action & Action.Listener>
voidaddAction(T action)Deprecated.voidaddActionHandler(Action.Handler actionHandler)Deprecated.voidaddField(Object propertyId, Field<?> field)Deprecated.Registers the field with the form and adds the field to the form layout.booleanaddItemProperty(Object id, Property property)Deprecated.Adds a new property to form and create corresponding field.voidaddValidator(Validator validator)Deprecated.Adding validators directly to form is not supported.protected voidattachField(Object propertyId, Field field)Deprecated.Adds the field to the form layout.protected voidbindPropertyToField(Object propertyId, Property property, Field field)Deprecated.Binds an item property to a field.voidchangeVariables(Object source, Map<String,Object> variables)Deprecated.voidclear()Deprecated.Clears the value of the field.voidcommit()Deprecated.Updates all changes since the previous commit to the data source.protected voiddetachField(Field field)Deprecated.Called when a form field is detached from a Form.voiddiscard()Deprecated.Discards all changes since last commit.voidfocus()Deprecated.Focuses the first field in the form.intgetComponentCount()Deprecated.Iterator<Component>getComponentIterator()Deprecated.As of 7.0, useiterator()instead.ErrorMessagegetErrorMessage()Deprecated.The error message of a Form is the error of the first field with a non-empty error.FieldgetField(Object propertyId)Deprecated.Gets the field identified by the propertyid.LayoutgetFooter()Deprecated.Returns a layout that is rendered below normal form contents.FormFieldFactorygetFormFieldFactory()Deprecated.Get the field factory of the form.ItemgetItemDataSource()Deprecated.Gets the Item serving as the data source of the viewer.PropertygetItemProperty(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.LayoutgetLayout()Deprecated.Gets the layout of the form.protected ActionManagergetOwnActionManager()Deprecated.Gets theActionManagerresponsible for handlingActions added to this Form.
Note that Form has another ActionManager inherited fromAbstractField.protected FormStategetState()Deprecated.protected FormStategetState(boolean markAsDirty)Deprecated.Class<?>getType()Deprecated.Gets the field type.Collection<?>getVisibleItemProperties()Deprecated.Returns the visibleProperties.booleanisEmpty()Deprecated.Is the field empty?booleanisInvalidAllowed()Deprecated.Checks the validabtable object accept invalid values.booleanisModified()Deprecated.Tests if the value stored in the object has been modified since it was last updated from the data source.booleanisValidationVisibleOnCommit()Deprecated.Is validation made automatically visible on commit?Iterator<Component>iterator()Deprecated.voidpaintContent(PaintTarget target)Deprecated.<T extends Action & Action.Listener>
voidremoveAction(T action)Deprecated.voidremoveActionHandler(Action.Handler actionHandler)Deprecated.voidremoveAllActionHandlers()Deprecated.Removes all action handlers.booleanremoveAllProperties()Deprecated.Removes all properties and fields from the form.booleanremoveItemProperty(Object id)Deprecated.Removes the property and corresponding field from the form.AbstractSelectreplaceWithSelect(Object propertyId, Object[] values, Object[] descriptions)Deprecated.Sets the form field to be selectable from static list of changes.voidsetBuffered(boolean buffered)Deprecated.Sets the buffered mode of this Field.voidsetEnabled(boolean enabled)Deprecated.voidsetFooter(Layout footer)Deprecated.Sets the layout that is rendered below normal form contents.protected voidsetFormDataSource(Object data, Collection<?> properties)Deprecated.Updates the internal form datasource.voidsetFormFieldFactory(FormFieldFactory fieldFactory)Deprecated.Sets the field factory used by this Form to genarate Fields for properties.voidsetImmediate(boolean immediate)Deprecated.Setting the form to be immediate also sets all the fields of the form to the same state.protected voidsetInternalValue(Object newValue)Deprecated.Sets the internal value.voidsetInvalidAllowed(boolean invalidValueAllowed)Deprecated.Should the validabtable object accept invalid values.voidsetItemDataSource(Item newDataSource)Deprecated.Sets the item datasource for the form.voidsetItemDataSource(Item newDataSource, Collection<?> propertyIds)Deprecated.Set the item datasource for the form, but limit the form contents to specified properties of the item.voidsetLayout(Layout layout)Deprecated.Sets the layout of the form.voidsetReadOnly(boolean readOnly)Deprecated.Sets the component's to read-only mode to the specified state.voidsetTabIndex(int tabIndex)Deprecated.Sets the Tabulator index of this Focusable component.voidsetValidationVisibleOnCommit(boolean makeVisible)Deprecated.Controls the making validation visible implicitly on commit.voidsetVisibleItemProperties(Object... visibleProperties)Deprecated.Sets the visibleProperties.voidsetVisibleItemProperties(Collection<?> visibleProperties)Deprecated.Sets the visibleProperties.voidvalidate()Deprecated.Checks the validity of the Form and all of its fields.-
Methods inherited from class com.vaadin.v7.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValueChangeListener, attach, beforeClientResponse, detach, fireReadOnlyStatusChange, fireValueChange, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, getValue, isBuffered, isInvalidCommitted, isReadOnly, isRequired, isValid, isValidationVisible, readDesign, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInvalidCommitted, setLocale, setPropertyDataSource, setRequired, setRequiredError, setValidationVisible, setValue, setValue, setValue, shouldHideErrors, validate, valueChange, writeDesign
-
Methods inherited from class com.vaadin.v7.ui.AbstractLegacyComponent
getExplicitImmediateValue, isImmediate
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesign
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface com.vaadin.ui.LegacyComponent
markAsDirty
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from interface com.vaadin.server.VariableOwner
isEnabled
-
-
-
-
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 givenLayout.- Parameters:
formLayout- the layout of the form.
-
Form
public Form(Layout formLayout, FormFieldFactory fieldFactory)
Deprecated.Constructs a new form with givenLayoutandFormFieldFactory.- Parameters:
formLayout- the layout of the form.fieldFactory- the FieldFactory of the form.
-
-
Method Detail
-
getState
protected FormState getState()
Deprecated.- Overrides:
getStatein classAbstractField<Object>
-
getState
protected FormState getState(boolean markAsDirty)
Deprecated.- Overrides:
getStatein classAbstractField<Object>
-
paintContent
public void paintContent(PaintTarget target) throws PaintException
Deprecated.- Specified by:
paintContentin interfaceLegacyComponent- Throws:
PaintException
-
changeVariables
public void changeVariables(Object source, Map<String,Object> variables)
Deprecated.- Specified by:
changeVariablesin interfaceVariableOwner
-
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:
getErrorMessagein classAbstractField<Object>- 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 behavior. 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.InvalidValueExceptionDeprecated.Description copied from interface:BufferedUpdates all changes since the previous commit to the data source. The value stored in the object will always be updated into the data source whencommitis called.- Specified by:
commitin interfaceBuffered- Overrides:
commitin classAbstractField<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.SourceExceptionDeprecated.Description copied from interface:BufferedDiscards all changes since last commit. The object updates its value from the data source.- Specified by:
discardin interfaceBuffered- Overrides:
discardin classAbstractField<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:BufferedTests if the value stored in the object has been modified since it was last updated from the data source.- Specified by:
isModifiedin interfaceBuffered- Overrides:
isModifiedin classAbstractField<Object>- Returns:
trueif the value in the object has been modified since the last data source update,falseif not.
-
setBuffered
public void setBuffered(boolean buffered)
Deprecated.Description copied from class:AbstractFieldSets the buffered mode of this Field.When the field is in buffered mode, changes will not be committed to the property data source until
AbstractField.commit()is called.Setting buffered mode from true to false will commit any pending changes.
- Specified by:
setBufferedin interfaceBuffered- Overrides:
setBufferedin classAbstractField<Object>- Parameters:
buffered- true if buffered mode should be turned on, false otherwise
-
addItemProperty
public boolean addItemProperty(Object id, Property property)
Deprecated.Adds a new property to form and create corresponding field.- Specified by:
addItemPropertyin interfaceItem- Parameters:
id- ID of the new Propertyproperty- the Property to be added and associated with the id- Returns:
trueif the operation succeeded,falseif 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 aCustomLayoutthe field is added to the CustomLayout location given by the string representation of the property id usingCustomLayout.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:
getItemPropertyin interfaceItem- 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:ItemGets the collection of IDs of all Properties stored in the Item.- Specified by:
getItemPropertyIdsin interfaceItem- 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:
removeItemPropertyin interfaceItem- Parameters:
id- ID of the Property to be removed- Returns:
trueif 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 viasetItemDataSource(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.ViewerGets the Item serving as the data source of the viewer.- Specified by:
getItemDataSourcein interfaceItem.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:
setItemDataSourcein interfaceItem.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
OrderedLayoutwithform-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 anAbstractSelectinstead of aSelect.- Parameters:
propertyId- the id of the property.values-descriptions-- Returns:
- the select property generated
-
validate
public void validate() throws Validator.InvalidValueExceptionDeprecated.Checks the validity of the Form and all of its fields.- Specified by:
validatein interfaceValidatable- Overrides:
validatein classAbstractField<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:
isInvalidAllowedin interfaceValidatable- Overrides:
isInvalidAllowedin classAbstractField<Object>- Returns:
- true if invalid values are allowed.
- See Also:
Validatable.isInvalidAllowed()
-
setInvalidAllowed
public void setInvalidAllowed(boolean invalidValueAllowed) throws UnsupportedOperationExceptionDeprecated.Should the validabtable object accept invalid values.- Specified by:
setInvalidAllowedin interfaceValidatable- Overrides:
setInvalidAllowedin classAbstractField<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:
setReadOnlyin interfaceProperty<Object>- Overrides:
setReadOnlyin classAbstractField<Object>- Parameters:
readOnly- a boolean value specifying whether the component is put read-only mode or not- See Also:
AbstractLegacyComponent.setReadOnly(boolean)
-
setFormFieldFactory
public void setFormFieldFactory(FormFieldFactory fieldFactory)
Deprecated.Sets the field factory used by this Form to genarate Fields for properties.FormFieldFactoryis used to create fields for form properties.DefaultFieldFactoryis 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:
getTypein interfaceProperty<Object>- Specified by:
getTypein classAbstractField<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:
setInternalValuein classAbstractField<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:
focusin interfaceComponent.Focusable- Overrides:
focusin classAbstractField<Object>- See Also:
Component.Focusable.focus()
-
setTabIndex
public void setTabIndex(int tabIndex)
Deprecated.Sets the Tabulator index of this Focusable component.- Specified by:
setTabIndexin interfaceComponent.Focusable- Overrides:
setTabIndexin classAbstractField<Object>- 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:
setImmediatein classAbstractLegacyComponent- Parameters:
immediate- the boolean value specifying if the component should be in the immediate mode after the call.
-
isEmpty
public boolean isEmpty()
Deprecated.Is the field empty? In general, "empty" state is same as null. As an exception, TextField also treats empty string as "empty".A Form is empty if all of its fields are empty.
-
clear
public void clear()
Deprecated.Description copied from interface:FieldClears the value of the field.The field value is typically reset to the initial value of the field. Calling
Field.isEmpty()on a cleared field must always returns true.
-
addValidator
public void addValidator(Validator validator)
Deprecated.Adding validators directly to form is not supported. Add the validators to form fields instead.- Specified by:
addValidatorin interfaceValidatable- Overrides:
addValidatorin classAbstractField<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 or null if no footer is used
-
setFooter
public void setFooter(Layout footer)
Deprecated.Sets the layout that is rendered below normal form contents. No footer is rendered if this is set to null, .- Parameters:
footer- the new footer layout
-
setEnabled
public void setEnabled(boolean enabled)
Deprecated.- Specified by:
setEnabledin interfaceComponent- Overrides:
setEnabledin classAbstractComponent
-
getOwnActionManager
protected ActionManager getOwnActionManager()
Deprecated.Gets theActionManagerresponsible for handlingActions added to this Form.
Note that Form has another ActionManager inherited fromAbstractField. 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.- Specified by:
addActionHandlerin interfaceAction.Container
-
removeActionHandler
public void removeActionHandler(Action.Handler actionHandler)
Deprecated.- Specified by:
removeActionHandlerin interfaceAction.Container
-
removeAllActionHandlers
public void removeAllActionHandlers()
Deprecated.Removes all action handlers.
-
addAction
public <T extends Action & Action.Listener> void addAction(T action)
Deprecated.- Specified by:
addActionin interfaceAction.Notifier
-
removeAction
public <T extends Action & Action.Listener> void removeAction(T action)
Deprecated.- Specified by:
removeActionin interfaceAction.Notifier
-
iterator
public Iterator<Component> iterator()
Deprecated.- Specified by:
iteratorin interfaceHasComponents- Specified by:
iteratorin interfaceIterable<Component>
-
getComponentIterator
@Deprecated public Iterator<Component> getComponentIterator()
Deprecated.As of 7.0, useiterator()instead.
-
getComponentCount
public int getComponentCount()
Deprecated.
-
-