public class WSearchComboBox extends WAbstractComboBox
setFilterTimeout(Decimal)
.
Short filter text is ignored even if user stopped typing. The minimal length the text must have in order to
be used for filtering is configured via setMinimalFilterLength(Decimal)
method.WAbstractSelect.VariantConverter
ComponentWithValue.ValueChangeListenerImpl, ComponentWithValue.ValueProperty<T>
options, PROPERTY_CAPTION, widgetConfigured
refreshing
form, INTERNAL_STATE_RECORD_PROPERTY
Constructor and Description |
---|
WSearchComboBox()
Creates a new combo box.
|
Modifier and Type | Method and Description |
---|---|
protected com.vaadin.ui.AbstractSelect |
createWidget()
Called once, to create the actual Vaadin component.
|
Decimal |
getFilterTimeout()
Search combo-box does not refresh drop down content until user stopped typing for
timeout milliseconds. |
String |
getInputPrompt()
Gets the current input prompt.
|
Decimal |
getMinimalFilterLength()
The minimal length the text typed into the combo box must have in order to be used
for filtering.
|
Decimal |
getPageLength()
Gets the length of the popup page
|
com.whitestein.lsps.vaadin.extensions.SearchComboBox |
getWidget()
Gets the Vaadin representation of this component.
|
protected void |
restoreInternalState(Map<String,Object> state)
Restores the UI state of this component which was previously written
by
FormComponent.writeInternalState(Map) . |
void |
setFilterTimeout(Decimal timeout)
Search combo-box does not refresh drop down content until user stopped typing for
timeout milliseconds. |
void |
setInputPrompt(String inputPrompt)
Sets the input prompt - a textual prompt that is displayed when the
select would otherwise be empty, to prompt the user for input.
|
void |
setMinimalFilterLength(Decimal minFilterLength)
The minimal length the text typed into the combo box must have in order to be used
for filtering.
|
void |
setPageLength(Decimal pageLength)
Sets the length of the popup page.
|
protected void |
writeInternalState(Map<String,Object> state)
Writes the UI state of this component to the provided map.
|
createDataSource, refresh, setExtendableOptions, setNewItemHandler, setOptions
configure, isNullSelectionAllowed, preventGC, setNullSelectionAllowed, setOptions, setOptionsToContainer
addValidator, fireValueChanged, focus, getOnChange, getValidationErrors, inferValidator, isConvertible, isImmediate, isRequired, isValid, removeAllValidators, setImmediate, setOnChange, setRequired
getBinding, getProperty, isFullyInitialized, onPropertyValueSet, refreshBinding, setProperty
addDataErrorMessage, addStyleName, attach, call, clearDataErrorMessages, createEvent, equals, getCaption, getComponentAlignment, getContextClickHandler, getCustomErrorMessage, getDataErrorMessages, getDescription, getExpandRatio, getHasChildrenAdapter, getHeight, getIcon, getModelingId, getNamespace, getStyleName, getTabIndex, getWidth, hashCode, isEnabled, isReadOnly, isVisible, localize, markAsDirty, removeStyleName, restoreState, saveState, setCaption, setComponentAlignment, setContextClickHandler, setContextMenuItems, setCustomErrorMessage, setDescription, setEnabled, setExpandRatio, setHeight, setIcon, setReadOnly, setStyleName, setTabIndex, setVisible, setWidth, toString
protected com.vaadin.ui.AbstractSelect createWidget()
FormComponent
createWidget
in class WAbstractSelect<Object>
public com.whitestein.lsps.vaadin.extensions.SearchComboBox getWidget()
FormComponent
getWidget
in class WAbstractSelect<Object>
public void setMinimalFilterLength(Decimal minFilterLength)
minFilterLength
- - minimal length of filterpublic Decimal getMinimalFilterLength()
public void setFilterTimeout(Decimal timeout)
timeout
milliseconds.timeout
- public Decimal getFilterTimeout()
timeout
milliseconds.public void setPageLength(Decimal pageLength)
pageLength
- public Decimal getPageLength()
protected void writeInternalState(Map<String,Object> state)
FormComponent
Many UI attributes such as size, caption, etc. are not held in the records but are stored exclusively in the Vaadin components. In the records the getter/setter methods of such attributes directly delegate to the underlying component. For the purposes of the Save Document/Todo use case the state of such attributes has to be preserved.
Subclasses should override this method. The overriding method should call
super.writeInternalState(state)
to store the state form the super
class as well. The attributes should be written to the provided state
parameter. The type of the values written to the state
can only by
Java representation of LSPS types. That is java.util.Date
,
java.lang.String
, Decimal
, RecordHolder
,
ListHolder
, ... The name of the attributes stored in the map
should be unique and should not collide with the names used by any
of the superclass. It is the responsibility of the overridden method to ensure
that.
Subclasses overriding this method should also override
FormComponent.restoreInternalState(Map)
and restore the state written
by this method.
writeInternalState
in class WAbstractComboBox
state
- a map to which this method should write the component's UI state.FormComponent.restoreInternalState(Map)
,
FormComponent.saveState()
protected void restoreInternalState(Map<String,Object> state)
FormComponent
FormComponent.writeInternalState(Map)
.
Subclasses should override and call super.restoreInternalState(state);
restoreInternalState
in class WAbstractComboBox
state
- a map of attributes and their valuesFormComponent.writeInternalState(Map)
public String getInputPrompt()
setInputPrompt(String)
public void setInputPrompt(String inputPrompt)
inputPrompt
- the desired input prompt, or null to disableCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.