Class AbstractSelect
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.v7.ui.AbstractLegacyComponent
-
- com.vaadin.v7.ui.AbstractField<Object>
-
- com.vaadin.v7.ui.AbstractSelect
-
- All Implemented Interfaces:
Action.ShortcutNotifier,ConnectorEventListener,ContextClickEvent.ContextClickNotifier,MethodEventSource,SerializableEventListener,ClientConnector,Sizeable,VariableOwner,com.vaadin.shared.Connector,Component,Component.Focusable,LegacyComponent,Buffered,BufferedValidatable,Container,Container.ItemSetChangeListener,Container.ItemSetChangeNotifier,Container.PropertySetChangeListener,Container.PropertySetChangeNotifier,Container.Viewer,Property<Object>,Property.Editor,Property.ReadOnlyStatusChangeListener,Property.ReadOnlyStatusChangeNotifier,Property.ValueChangeListener,Property.ValueChangeNotifier,Property.Viewer,Validatable,Field<Object>,Serializable,EventListener
- Direct Known Subclasses:
ComboBox,ListSelect,NativeSelect,OptionGroup,Table,Tree,TwinColSelect
@Deprecated public abstract class AbstractSelect extends AbstractField<Object> implements Container, Container.Viewer, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier, Container.ItemSetChangeListener, LegacyComponent
Deprecated.As of 8.0, replaced byAbstractListingA class representing a selection of items the user has selected in a UI. The set of choices is presented as a set of
Items in aContainer.A
Selectcomponent may be in single- or multiselect mode. Multiselect mode means that more than one item can be selected simultaneously.- Since:
- 5.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractSelect.AbstractSelectTargetDetailsDeprecated.static classAbstractSelect.AcceptItemDeprecated.protected classAbstractSelect.CaptionChangeListenerDeprecated.classAbstractSelect.DefaultNewItemHandlerDeprecated.static interfaceAbstractSelect.FilteringDeprecated.static classAbstractSelect.ItemCaptionModeDeprecated.static interfaceAbstractSelect.ItemDescriptionGeneratorDeprecated.static interfaceAbstractSelect.NewItemHandlerDeprecated.static classAbstractSelect.TargetItemIsDeprecated.static classAbstractSelect.VerticalLocationIsDeprecated.-
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.data.Container
Container.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.Viewer
-
Nested classes/interfaces inherited from interface com.vaadin.v7.ui.Field
Field.ValueChangeEvent
-
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 AbstractSelect()Deprecated.Creates an empty Select.AbstractSelect(String caption)Deprecated.Creates an empty Select with caption.AbstractSelect(String caption, Container dataSource)Deprecated.Creates a new select that is connected to a data-source.AbstractSelect(String caption, Collection<?> options)Deprecated.Creates a new select that is filled from a collection of option values.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanaddContainerProperty(Object propertyId, Class<?> type, Object defaultValue)Deprecated.Adds the new property to all items.ObjectaddItem()Deprecated.Creates a new item into container with container managed id.ItemaddItem(Object itemId)Deprecated.Create a new item into container.voidaddItems(Object... itemId)Deprecated.Adds given items with given item ids to container.voidaddItems(Collection<?> itemIds)Deprecated.Adds given items with given item ids to container.voidaddItemSetChangeListener(Container.ItemSetChangeListener listener)Deprecated.Adds an Item set change listener for the object.voidaddListener(Container.ItemSetChangeListener listener)Deprecated.As of 7.0, replaced byaddItemSetChangeListener(Container.ItemSetChangeListener)voidaddListener(Container.PropertySetChangeListener listener)Deprecated.As of 7.0, replaced byaddPropertySetChangeListener(Container.PropertySetChangeListener)voidaddPropertySetChangeListener(Container.PropertySetChangeListener listener)Deprecated.Adds a new Property set change listener for this Container.voidattach()Deprecated.Notifies the component that it is connected to an application.voidchangeVariables(Object source, Map<String,Object> variables)Deprecated.voidcontainerItemSetChange(Container.ItemSetChangeEvent event)Deprecated.Lets the listener know a Containers Item set has changed.voidcontainerPropertySetChange(Container.PropertySetChangeEvent event)Deprecated.Notifies this listener that the Containers contents has changed.booleancontainsId(Object itemId)Deprecated.Tests, if the collection contains an item with given id.voiddetach()Deprecated.Detaches the component from application.protected voidfireItemSetChange()Deprecated.Fires the item set change event.protected voidfirePropertySetChange()Deprecated.Fires the property set change event.protected AbstractSelect.CaptionChangeListenergetCaptionChangeListener()Deprecated.ContainergetContainerDataSource()Deprecated.Gets the viewing data-source container.PropertygetContainerProperty(Object itemId, Object propertyId)Deprecated.Gets the Property identified by the given itemId and propertyId from the Container.Collection<?>getContainerPropertyIds()Deprecated.Gets the property Id collection from the container.ItemgetItem(Object itemId)Deprecated.Gets the item from the container with given id.StringgetItemCaption(Object itemId)Deprecated.Gets the caption of an item.AbstractSelect.ItemCaptionModegetItemCaptionMode()Deprecated.Gets the item caption mode.ObjectgetItemCaptionPropertyId()Deprecated.Gets the item caption property.ResourcegetItemIcon(Object itemId)Deprecated.Gets the item icon.ObjectgetItemIconPropertyId()Deprecated.Gets the item icon property.Collection<?>getItemIds()Deprecated.Gets the item Id collection from the container.Collection<?>getListeners(Class<?> eventType)Deprecated.AbstractSelect.NewItemHandlergetNewItemHandler()Deprecated.Returns the new item handler, which is called when user adds new item innewItemAllowedmode.ObjectgetNullSelectionItemId()Deprecated.Returns the item id that represents null value of this select in single select mode.protected AbstractSelectStategetState()Deprecated.protected AbstractSelectStategetState(boolean markAsDirty)Deprecated.Class<?>getType()Deprecated.Returns the type of the property.Class<?>getType(Object propertyId)Deprecated.Gets the property type.ObjectgetValue()Deprecated.Gets the selected item id or in multiselect mode a set of selected ids.Collection<?>getVisibleItemIds()Deprecated.Gets the visible item ids.booleanisEmpty()Deprecated.For multi-selectable fields, also an empty collection of values is considered to be an empty field.booleanisMultiSelect()Deprecated.Is the select in multiselect mode?booleanisNewItemsAllowed()Deprecated.Does the select allow adding new options by the user.booleanisNullSelectionAllowed()Deprecated.Checks if null empty selection is allowed by the user.booleanisSelected(Object itemId)Deprecated.Tests if an item is selected.voidpaintContent(PaintTarget target)Deprecated.Paints the content of this component.protected voidpaintItem(PaintTarget target, Object itemId)Deprecated.voidreadDesign(org.jsoup.nodes.Element design, DesignContext context)Deprecated.protected ObjectreadItem(org.jsoup.nodes.Element child, Set<String> selected, DesignContext context)Deprecated.Reads an Item from a design and inserts it into the data source.protected voidreadItems(org.jsoup.nodes.Element design, DesignContext context)Deprecated.booleanremoveAllItems()Deprecated.Removes all items from the container.booleanremoveContainerProperty(Object propertyId)Deprecated.Removes the property from all items.booleanremoveItem(Object itemId)Deprecated.Removes the Item identified byItemIdfrom the Container.voidremoveItemSetChangeListener(Container.ItemSetChangeListener listener)Deprecated.Removes the Item set change listener from the object.voidremoveListener(Container.ItemSetChangeListener listener)Deprecated.As of 7.0, replaced byremoveItemSetChangeListener(Container.ItemSetChangeListener)voidremoveListener(Container.PropertySetChangeListener listener)Deprecated.As of 7.0, replaced byremovePropertySetChangeListener(Container.PropertySetChangeListener)voidremovePropertySetChangeListener(Container.PropertySetChangeListener listener)Deprecated.Removes a previously registered Property set change listener.voidsanitizeSelection()Deprecated.Checks that the current selection is valid, i.e. the selected item ids exist in the container.voidselect(Object itemId)Deprecated.Selects an item.voidsetContainerDataSource(Container newDataSource)Deprecated.Sets the Container that serves as the data source of the viewer.voidsetItemCaption(Object itemId, String caption)Deprecated.Override the caption of an item.voidsetItemCaptionMode(AbstractSelect.ItemCaptionMode mode)Deprecated.Sets the item caption mode.voidsetItemCaptionPropertyId(Object propertyId)Deprecated.Sets the item caption property.voidsetItemIcon(Object itemId, Resource icon)Deprecated.Sets the icon for an item.voidsetItemIconPropertyId(Object propertyId)Deprecated.Sets the item icon property.voidsetMultiSelect(boolean multiSelect)Deprecated.Sets the multiselect mode.voidsetNewItemHandler(AbstractSelect.NewItemHandler newItemHandler)Deprecated.TODO refine doc Setter for new item handler, which is called when user adds new item innewItemAllowedmode.voidsetNewItemsAllowed(boolean allowNewOptions)Deprecated.Enables or disables possibility to add new options by the user.voidsetNullSelectionAllowed(boolean nullSelectionAllowed)Deprecated.Allow or disallow empty selection by the user.voidsetNullSelectionItemId(Object nullSelectionItemId)Deprecated.Sets the item id that represents null value of this select.voidsetValue(Object newValue)Deprecated.Sets the visible value of the property.protected voidsetValue(Object newFieldValue, boolean repaintIsNotNeeded, boolean ignoreReadOnly)Deprecated.Sets the visible value of the property.intsize()Deprecated.Gets the number of items in the container.voidunselect(Object itemId)Deprecated.Unselects an item.voidwriteDesign(org.jsoup.nodes.Element design, DesignContext context)Deprecated.protected org.jsoup.nodes.ElementwriteItem(org.jsoup.nodes.Element design, Object itemId, DesignContext context)Deprecated.Writes a data source Item to a design.protected voidwriteItems(org.jsoup.nodes.Element design, DesignContext context)Deprecated.Writes the data source items to a design.-
Methods inherited from class com.vaadin.v7.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, clear, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, shouldHideErrors, validate, validate, valueChange
-
Methods inherited from class com.vaadin.v7.ui.AbstractLegacyComponent
getExplicitImmediateValue, isImmediate, setImmediate
-
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, setEnabled, 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, 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, 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, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible
-
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
-
-
-
-
Field Detail
-
ITEM_CAPTION_MODE_ID
@Deprecated public static final AbstractSelect.ItemCaptionMode ITEM_CAPTION_MODE_ID
Deprecated.As of 7.0, useAbstractSelect.ItemCaptionMode.IDinstead
-
ITEM_CAPTION_MODE_ITEM
@Deprecated public static final AbstractSelect.ItemCaptionMode ITEM_CAPTION_MODE_ITEM
Deprecated.As of 7.0, useAbstractSelect.ItemCaptionMode.ITEMinstead
-
ITEM_CAPTION_MODE_INDEX
@Deprecated public static final AbstractSelect.ItemCaptionMode ITEM_CAPTION_MODE_INDEX
Deprecated.As of 7.0, useAbstractSelect.ItemCaptionMode.INDEXinstead
-
ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID
@Deprecated public static final AbstractSelect.ItemCaptionMode ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID
Deprecated.As of 7.0, useAbstractSelect.ItemCaptionMode.EXPLICIT_DEFAULTS_IDinstead
-
ITEM_CAPTION_MODE_EXPLICIT
@Deprecated public static final AbstractSelect.ItemCaptionMode ITEM_CAPTION_MODE_EXPLICIT
Deprecated.As of 7.0, useAbstractSelect.ItemCaptionMode.EXPLICITinstead
-
ITEM_CAPTION_MODE_ICON_ONLY
@Deprecated public static final AbstractSelect.ItemCaptionMode ITEM_CAPTION_MODE_ICON_ONLY
Deprecated.As of 7.0, useAbstractSelect.ItemCaptionMode.ICON_ONLYinstead
-
ITEM_CAPTION_MODE_PROPERTY
@Deprecated public static final AbstractSelect.ItemCaptionMode ITEM_CAPTION_MODE_PROPERTY
Deprecated.As of 7.0, useAbstractSelect.ItemCaptionMode.PROPERTYinstead
-
items
protected Container items
Deprecated.Select options.
-
-
Constructor Detail
-
AbstractSelect
public AbstractSelect()
Deprecated.Creates an empty Select. The caption is not used.
-
AbstractSelect
public AbstractSelect(String caption)
Deprecated.Creates an empty Select with caption.
-
AbstractSelect
public AbstractSelect(String caption, Container dataSource)
Deprecated.Creates a new select that is connected to a data-source.- Parameters:
caption- the Caption of the component.dataSource- the Container datasource to be selected from by this select.
-
AbstractSelect
public AbstractSelect(String caption, Collection<?> options)
Deprecated.Creates a new select that is filled from a collection of option values.- Parameters:
caption- the Caption of this field.options- the Collection containing the options.
-
-
Method Detail
-
paintContent
public void paintContent(PaintTarget target) throws PaintException
Deprecated.Paints the content of this component.- Specified by:
paintContentin interfaceLegacyComponent- Parameters:
target- the Paint Event.- Throws:
PaintException- if the paint operation failed.
-
paintItem
protected void paintItem(PaintTarget target, Object itemId) throws PaintException
Deprecated.- Throws:
PaintException
-
changeVariables
public void changeVariables(Object source, Map<String,Object> variables)
Deprecated.- Specified by:
changeVariablesin interfaceVariableOwner
-
setNewItemHandler
public void setNewItemHandler(AbstractSelect.NewItemHandler newItemHandler)
Deprecated.TODO refine doc Setter for new item handler, which is called when user adds new item innewItemAllowedmode.- Parameters:
newItemHandler- The new item handler
-
getNewItemHandler
public AbstractSelect.NewItemHandler getNewItemHandler()
Deprecated.Returns the new item handler, which is called when user adds new item innewItemAllowedmode.- Returns:
- NewItemHandler
-
getVisibleItemIds
public Collection<?> getVisibleItemIds()
Deprecated.Gets the visible item ids. In Select, this returns list of all item ids, but can be overridden in subclasses if they paint only part of the items to the terminal or null if no items is visible.
-
getType
public Class<?> getType()
Deprecated.Returns the type of the property.getValueandsetValuemethods must be compatible with this type: one can safely castgetValueto given type and pass any variable assignable to this type as a parameter tosetValue.
-
getValue
public Object getValue()
Deprecated.Gets the selected item id or in multiselect mode a set of selected ids.- Specified by:
getValuein interfaceProperty<Object>- Overrides:
getValuein classAbstractField<Object>- Returns:
- the current value of the field.
- See Also:
AbstractField.getValue()
-
setValue
public void setValue(Object newValue) throws Property.ReadOnlyException
Deprecated.Sets the visible value of the property.The value of the select is the selected item id. If the select is in multiselect-mode, the value is a set of selected item keys. In multiselect mode all collections of id:s can be assigned.
- Specified by:
setValuein interfaceProperty<Object>- Overrides:
setValuein classAbstractField<Object>- Parameters:
newValue- the New selected item or collection of selected items.- Throws:
Property.ReadOnlyException- if the object is in read-only mode- See Also:
AbstractField.setValue(java.lang.Object)
-
setValue
protected void setValue(Object newFieldValue, boolean repaintIsNotNeeded, boolean ignoreReadOnly) throws Property.ReadOnlyException, Converter.ConversionException, Validator.InvalidValueException
Deprecated.Sets the visible value of the property.The value of the select is the selected item id. If the select is in multiselect-mode, the value is a set of selected item keys. In multiselect mode all collections of id:s can be assigned.
- Overrides:
setValuein classAbstractField<Object>- Parameters:
newFieldValue- the New selected item or collection of selected items.repaintIsNotNeeded- True if caller is sure that repaint is not needed.ignoreReadOnly- True if read-only check should be omitted.- Throws:
Property.ReadOnlyExceptionConverter.ConversionExceptionValidator.InvalidValueException- Since:
- 7.5.7
-
getItem
public Item getItem(Object itemId)
Deprecated.Gets the item from the container with given id. If the container does not contain the requested item, null is returned.
-
getItemIds
public Collection<?> getItemIds()
Deprecated.Gets the item Id collection from the container.- Specified by:
getItemIdsin interfaceContainer- Returns:
- the Collection of item ids.
-
getContainerPropertyIds
public Collection<?> getContainerPropertyIds()
Deprecated.Gets the property Id collection from the container.- Specified by:
getContainerPropertyIdsin interfaceContainer- Returns:
- the Collection of property ids.
-
getType
public Class<?> getType(Object propertyId)
Deprecated.Gets the property type.- Specified by:
getTypein interfaceContainer- Parameters:
propertyId- the Id identifying the property.- Returns:
- data type of the Properties
- See Also:
Container.getType(java.lang.Object)
-
size
public int size()
Deprecated.Gets the number of items in the container.- Specified by:
sizein interfaceContainer- Returns:
- the Number of items in the container.
- See Also:
Container.size()
-
containsId
public boolean containsId(Object itemId)
Deprecated.Tests, if the collection contains an item with given id.- Specified by:
containsIdin interfaceContainer- Parameters:
itemId- the Id the of item to be tested.- Returns:
- boolean indicating if the Container holds the specified Item
-
getContainerProperty
public Property getContainerProperty(Object itemId, Object propertyId)
Deprecated.Gets the Property identified by the given itemId and propertyId from the Container.- Specified by:
getContainerPropertyin interfaceContainer- Parameters:
itemId- ID of the visible Item which contains the PropertypropertyId- ID of the Property to retrieve- Returns:
- Property with the given ID or
null - See Also:
Container.getContainerProperty(Object, Object)
-
addContainerProperty
public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException
Deprecated.Adds the new property to all items. Adds a property with given id, type and default value to all items in the container. This functionality is optional. If the function is unsupported, it always returns false.- Specified by:
addContainerPropertyin interfaceContainer- Parameters:
propertyId- ID of the Propertytype- Data type of the new PropertydefaultValue- The value all created Properties are initialized to- Returns:
- True if the operation succeeded.
- Throws:
UnsupportedOperationException- if the container does not support explicitly adding container properties- See Also:
Container.addContainerProperty(java.lang.Object, java.lang.Class, java.lang.Object)
-
removeAllItems
public boolean removeAllItems() throws UnsupportedOperationExceptionDeprecated.Removes all items from the container. This functionality is optional. If the function is unsupported, it always returns false.- Specified by:
removeAllItemsin interfaceContainer- Returns:
- True if the operation succeeded.
- Throws:
UnsupportedOperationException- if the container does not support removing all items- See Also:
Container.removeAllItems()
-
addItem
public Object addItem() throws UnsupportedOperationException
Deprecated.Creates a new item into container with container managed id. The id of the created new item is returned. The item can be fetched with getItem() method. if the creation fails, null is returned.- Specified by:
addItemin interfaceContainer- Returns:
- the Id of the created item or null in case of failure.
- Throws:
UnsupportedOperationException- if adding an item without an explicit item ID is not supported by the container- See Also:
Container.addItem()
-
addItem
public Item addItem(Object itemId) throws UnsupportedOperationException
Deprecated.Create a new item into container. The created new item is returned and ready for setting property values. if the creation fails, null is returned. In case the container already contains the item, null is returned. This functionality is optional. If the function is unsupported, it always returns null.- Specified by:
addItemin interfaceContainer- Parameters:
itemId- the Identification of the item to be created.- Returns:
- the Created item with the given id, or null in case of failure.
- Throws:
UnsupportedOperationException- if adding an item with an explicit item ID is not supported by the container- See Also:
Container.addItem(java.lang.Object)
-
addItems
public void addItems(Object... itemId) throws UnsupportedOperationException
Deprecated.Adds given items with given item ids to container.- Parameters:
itemId- item identifiers to be added to underlying container- Throws:
UnsupportedOperationException- if the underlying container don't support adding items with identifiers- Since:
- 7.2
-
addItems
public void addItems(Collection<?> itemIds) throws UnsupportedOperationException
Deprecated.Adds given items with given item ids to container.- Parameters:
itemIds- item identifiers to be added to underlying container- Throws:
UnsupportedOperationException- if the underlying container don't support adding items with identifiers- Since:
- 7.2
-
removeItem
public boolean removeItem(Object itemId) throws UnsupportedOperationException
Deprecated.Description copied from interface:ContainerRemoves the Item identified byItemIdfrom the Container.Containers that support filtering should also allow removing an item that is currently filtered out.
This functionality is optional.
- Specified by:
removeItemin interfaceContainer- Parameters:
itemId- ID of the Item to remove- Returns:
trueif the operation succeeded,falseif not- Throws:
UnsupportedOperationException- if the container does not support removing individual items
-
sanitizeSelection
public void sanitizeSelection()
Deprecated.Checks that the current selection is valid, i.e. the selected item ids exist in the container. Updates the selection if one or several selected item ids are no longer available in the container.
-
removeContainerProperty
public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException
Deprecated.Removes the property from all items. Removes a property with given id from all the items in the container. This functionality is optional. If the function is unsupported, it always returns false.- Specified by:
removeContainerPropertyin interfaceContainer- Parameters:
propertyId- ID of the Property to remove- Returns:
- True if the operation succeeded.
- Throws:
UnsupportedOperationException- if the container does not support removing container properties- See Also:
Container.removeContainerProperty(java.lang.Object)
-
setContainerDataSource
public void setContainerDataSource(Container newDataSource)
Deprecated.Sets the Container that serves as the data source of the viewer. As a side-effect the fields value (selection) is set to null due old selection not necessary exists in new Container.- Specified by:
setContainerDataSourcein interfaceContainer.Viewer- Parameters:
newDataSource- the new data source.- See Also:
Container.Viewer.setContainerDataSource(Container)
-
getContainerDataSource
public Container getContainerDataSource()
Deprecated.Gets the viewing data-source container.- Specified by:
getContainerDataSourcein interfaceContainer.Viewer- Returns:
- data source Container
- See Also:
Container.Viewer.getContainerDataSource()
-
isMultiSelect
public boolean isMultiSelect()
Deprecated.Is the select in multiselect mode? In multiselect mode- Returns:
- the Value of property multiSelect.
-
setMultiSelect
public void setMultiSelect(boolean multiSelect)
Deprecated.Sets the multiselect mode. Setting multiselect mode false may lose selection information: if selected items set contains one or more selected items, only one of the selected items is kept as selected. Subclasses of AbstractSelect can choose not to support changing the multiselect mode, and may throwUnsupportedOperationException.- Parameters:
multiSelect- the New value of property multiSelect.
-
isNewItemsAllowed
public boolean isNewItemsAllowed()
Deprecated.Does the select allow adding new options by the user. If true, the new options can be added to the Container. The text entered by the user is used as id. Note that data-source must allow adding new items.- Returns:
- True if additions are allowed.
-
setNewItemsAllowed
public void setNewItemsAllowed(boolean allowNewOptions)
Deprecated.Enables or disables possibility to add new options by the user.- Parameters:
allowNewOptions- the New value of property allowNewOptions.
-
setItemCaption
public void setItemCaption(Object itemId, String caption)
Deprecated.Override the caption of an item. Setting caption explicitly overrides id, item and index captions.- Parameters:
itemId- the id of the item to be recaptioned.caption- the New caption.
-
getItemCaption
public String getItemCaption(Object itemId)
Deprecated.Gets the caption of an item. The caption is generated as specified by the item caption mode. SeesetItemCaptionMode()for more details.- Parameters:
itemId- the id of the item to be queried.- Returns:
- the caption for specified item.
-
setItemIcon
public void setItemIcon(Object itemId, Resource icon)
Deprecated.Sets the icon for an item.- Parameters:
itemId- the id of the item to be assigned an icon.icon- the icon to use or null.
-
getItemIcon
public Resource getItemIcon(Object itemId)
Deprecated.Gets the item icon.- Parameters:
itemId- the id of the item to be assigned an icon.- Returns:
- the icon for the item or null, if not specified.
-
setItemCaptionMode
public void setItemCaptionMode(AbstractSelect.ItemCaptionMode mode)
Deprecated.Sets the item caption mode. SeeAbstractSelect.ItemCaptionModefor a description of the modes.AbstractSelect.ItemCaptionMode.EXPLICIT_DEFAULTS_IDis the default mode.- Parameters:
mode- the One of the modes listed above.
-
getItemCaptionMode
public AbstractSelect.ItemCaptionMode getItemCaptionMode()
Deprecated.Gets the item caption mode.
The mode can be one of the following ones:ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID: Items Id-objectstoStringis used as item caption. If caption is explicitly specified, it overrides the id-caption.ITEM_CAPTION_MODE_ID: Items Id-objectstoStringis used as item caption.ITEM_CAPTION_MODE_ITEM: Item-objectstoStringis used as item caption.ITEM_CAPTION_MODE_INDEX: The index of the item is used as item caption. The index mode can only be used with the containers implementingContainer.Indexedinterface.ITEM_CAPTION_MODE_EXPLICIT: The item captions must be explicitly specified.ITEM_CAPTION_MODE_PROPERTY: The item captions are read from property, that must be specified withsetItemCaptionPropertyId.
ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_IDis the default mode.- Returns:
- the One of the modes listed above.
-
setItemCaptionPropertyId
public void setItemCaptionPropertyId(Object propertyId)
Deprecated.Sets the item caption property.Setting the id to a existing property implicitly sets the item caption mode to
ITEM_CAPTION_MODE_PROPERTY. If the object is inITEM_CAPTION_MODE_PROPERTYmode, setting caption property id null resets the item caption mode toITEM_CAPTION_EXPLICIT_DEFAULTS_ID.Note that the type of the property used for caption must be String
Setting the property id to null disables this feature. The id is null by default
.- Parameters:
propertyId- the id of the property.
-
getItemCaptionPropertyId
public Object getItemCaptionPropertyId()
Deprecated.Gets the item caption property.- Returns:
- the Id of the property used as item caption source.
-
setItemIconPropertyId
public void setItemIconPropertyId(Object propertyId) throws IllegalArgumentException
Deprecated.Sets the item icon property.If the property id is set to a valid value, each item is given an icon got from the given property of the items. The type of the property must be assignable to Resource.
Note : The icons set with
setItemIconfunction override the icons from the property.Setting the property id to null disables this feature. The id is null by default
.- Parameters:
propertyId- the id of the property that specifies icons for items or null- Throws:
IllegalArgumentException- If the propertyId is not in the container or is not of a valid type
-
getItemIconPropertyId
public Object getItemIconPropertyId()
Deprecated.Gets the item icon property.If the property id is set to a valid value, each item is given an icon got from the given property of the items. The type of the property must be assignable to Icon.
Note : The icons set with
setItemIconfunction override the icons from the property.Setting the property id to null disables this feature. The id is null by default
.- Returns:
- the Id of the property containing the item icons.
-
isSelected
public boolean isSelected(Object itemId)
Deprecated.Tests if an item is selected.In single select mode testing selection status of the item identified by
getNullSelectionItemId()returns true if the value of the property is null.- Parameters:
itemId- the Id the of the item to be tested.- See Also:
getNullSelectionItemId(),setNullSelectionItemId(Object)
-
select
public void select(Object itemId)
Deprecated.Selects an item.In single select mode selecting item identified by
getNullSelectionItemId()sets the value of the property to null.- Parameters:
itemId- the identifier of Item to be selected.- See Also:
getNullSelectionItemId(),setNullSelectionItemId(Object)
-
unselect
public void unselect(Object itemId)
Deprecated.Unselects an item.- Parameters:
itemId- the identifier of the Item to be unselected.- See Also:
getNullSelectionItemId(),setNullSelectionItemId(Object)
-
containerPropertySetChange
public void containerPropertySetChange(Container.PropertySetChangeEvent event)
Deprecated.Notifies this listener that the Containers contents has changed.- Specified by:
containerPropertySetChangein interfaceContainer.PropertySetChangeListener- Parameters:
event- Change event.- See Also:
Container.PropertySetChangeListener.containerPropertySetChange(Container.PropertySetChangeEvent)
-
addPropertySetChangeListener
public void addPropertySetChangeListener(Container.PropertySetChangeListener listener)
Deprecated.Adds a new Property set change listener for this Container.- Specified by:
addPropertySetChangeListenerin interfaceContainer.PropertySetChangeNotifier- Parameters:
listener- The new Listener to be registered- See Also:
Container.PropertySetChangeNotifier.addListener(Container.PropertySetChangeListener)
-
addListener
@Deprecated public void addListener(Container.PropertySetChangeListener listener)
Deprecated.As of 7.0, replaced byaddPropertySetChangeListener(Container.PropertySetChangeListener)- Specified by:
addListenerin interfaceContainer.PropertySetChangeNotifier
-
removePropertySetChangeListener
public void removePropertySetChangeListener(Container.PropertySetChangeListener listener)
Deprecated.Removes a previously registered Property set change listener.- Specified by:
removePropertySetChangeListenerin interfaceContainer.PropertySetChangeNotifier- Parameters:
listener- Listener to be removed- See Also:
Container.PropertySetChangeNotifier.removeListener(Container.PropertySetChangeListener)
-
removeListener
@Deprecated public void removeListener(Container.PropertySetChangeListener listener)
Deprecated.As of 7.0, replaced byremovePropertySetChangeListener(Container.PropertySetChangeListener)- Specified by:
removeListenerin interfaceContainer.PropertySetChangeNotifier
-
addItemSetChangeListener
public void addItemSetChangeListener(Container.ItemSetChangeListener listener)
Deprecated.Adds an Item set change listener for the object.- Specified by:
addItemSetChangeListenerin interfaceContainer.ItemSetChangeNotifier- Parameters:
listener- listener to be added- See Also:
Container.ItemSetChangeNotifier.addListener(Container.ItemSetChangeListener)
-
addListener
@Deprecated public void addListener(Container.ItemSetChangeListener listener)
Deprecated.As of 7.0, replaced byaddItemSetChangeListener(Container.ItemSetChangeListener)- Specified by:
addListenerin interfaceContainer.ItemSetChangeNotifier
-
removeItemSetChangeListener
public void removeItemSetChangeListener(Container.ItemSetChangeListener listener)
Deprecated.Removes the Item set change listener from the object.- Specified by:
removeItemSetChangeListenerin interfaceContainer.ItemSetChangeNotifier- Parameters:
listener- listener to be removed- See Also:
Container.ItemSetChangeNotifier.removeListener(Container.ItemSetChangeListener)
-
removeListener
@Deprecated public void removeListener(Container.ItemSetChangeListener listener)
Deprecated.As of 7.0, replaced byremoveItemSetChangeListener(Container.ItemSetChangeListener)- Specified by:
removeListenerin interfaceContainer.ItemSetChangeNotifier
-
getListeners
public Collection<?> getListeners(Class<?> eventType)
Deprecated.- Overrides:
getListenersin classAbstractClientConnector
-
containerItemSetChange
public void containerItemSetChange(Container.ItemSetChangeEvent event)
Deprecated.Lets the listener know a Containers Item set has changed.- Specified by:
containerItemSetChangein interfaceContainer.ItemSetChangeListener- Parameters:
event- change event text- See Also:
Container.ItemSetChangeListener.containerItemSetChange(Container.ItemSetChangeEvent)
-
firePropertySetChange
protected void firePropertySetChange()
Deprecated.Fires the property set change event.
-
fireItemSetChange
protected void fireItemSetChange()
Deprecated.Fires the item set change event.
-
isEmpty
public boolean isEmpty()
Deprecated.For multi-selectable fields, also an empty collection of values is considered to be an empty field.- Specified by:
isEmptyin interfaceField<Object>- Overrides:
isEmptyin classAbstractField<Object>- Returns:
- true if the field is empty, false otherwise
- See Also:
AbstractField.isEmpty()
-
setNullSelectionAllowed
public void setNullSelectionAllowed(boolean nullSelectionAllowed)
Deprecated.Allow or disallow empty selection by the user. If the select is in single-select mode, you can make an item represent the empty selection by callingsetNullSelectionItemId(). This way you can for instance set an icon and caption for the null selection item.- Parameters:
nullSelectionAllowed- whether or not to allow empty selection- See Also:
setNullSelectionItemId(Object),isNullSelectionAllowed()
-
isNullSelectionAllowed
public boolean isNullSelectionAllowed()
Deprecated.Checks if null empty selection is allowed by the user.- Returns:
- whether or not empty selection is allowed
- See Also:
setNullSelectionAllowed(boolean)
-
getNullSelectionItemId
public Object getNullSelectionItemId()
Deprecated.Returns the item id that represents null value of this select in single select mode.Data interface does not support nulls as item ids. Selecting the item identified by this id is the same as selecting no items at all. This setting only affects the single select mode.
- Returns:
- the Object Null value item id.
- See Also:
setNullSelectionItemId(Object),isSelected(Object),select(Object)
-
setNullSelectionItemId
public void setNullSelectionItemId(Object nullSelectionItemId)
Deprecated.Sets the item id that represents null value of this select.Data interface does not support nulls as item ids. Selecting the item identified by this id is the same as selecting no items at all. This setting only affects the single select mode.
- Parameters:
nullSelectionItemId- the nullSelectionItemId to set.- See Also:
getNullSelectionItemId(),isSelected(Object),select(Object)
-
attach
public void attach()
Deprecated.Notifies the component that it is connected to an application.- Specified by:
attachin interfaceClientConnector- Specified by:
attachin interfaceComponent- Overrides:
attachin classAbstractField<Object>- See Also:
AbstractField.attach()
-
detach
public void detach()
Deprecated.Detaches the component from application.- Specified by:
detachin interfaceClientConnector- Overrides:
detachin classAbstractField<Object>- See Also:
AbstractComponent.detach()
-
getCaptionChangeListener
protected AbstractSelect.CaptionChangeListener getCaptionChangeListener()
Deprecated.
-
readDesign
public void readDesign(org.jsoup.nodes.Element design, DesignContext context)Deprecated.- Specified by:
readDesignin interfaceComponent- Overrides:
readDesignin classAbstractField<Object>
-
readItems
protected void readItems(org.jsoup.nodes.Element design, DesignContext context)Deprecated.
-
readItem
protected Object readItem(org.jsoup.nodes.Element child, Set<String> selected, DesignContext context)
Deprecated.Reads an Item from a design and inserts it into the data source. Hierarchical select components should override this method to recursively recursively read any child items as well.- Parameters:
child- a child element representing the itemselected- A set accumulating selected items. If the item that is read is marked as selected, its item id should be added to this set.context- the DesignContext instance used in parsing- Returns:
- the item id of the new item
- Throws:
DesignException- if the tag name of thechildelement is notoption.- Since:
- 7.5.0
-
writeDesign
public void writeDesign(org.jsoup.nodes.Element design, DesignContext context)Deprecated.- Specified by:
writeDesignin interfaceComponent- Overrides:
writeDesignin classAbstractField<Object>
-
writeItems
protected void writeItems(org.jsoup.nodes.Element design, DesignContext context)Deprecated.Writes the data source items to a design. Hierarchical select components should override this method to only write the root items.- Parameters:
design- the element into which to insert the itemscontext- the DesignContext instance used in writing- Since:
- 7.5.0
-
writeItem
protected org.jsoup.nodes.Element writeItem(org.jsoup.nodes.Element design, Object itemId, DesignContext context)Deprecated.Writes a data source Item to a design. Hierarchical select components should override this method to recursively write any child items as well.- Parameters:
design- the element into which to insert the itemitemId- the id of the item to writecontext- the DesignContext instance used in writing- Returns:
- Since:
- 7.5.0
-
getState
protected AbstractSelectState getState()
Deprecated.- Overrides:
getStatein classAbstractField<Object>
-
getState
protected AbstractSelectState getState(boolean markAsDirty)
Deprecated.- Overrides:
getStatein classAbstractField<Object>
-
-