Class ComboBox<T>
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.sencha.gxt.widget.core.client.Component
-
- com.sencha.gxt.widget.core.client.cell.CellComponent<T>
-
- com.sencha.gxt.widget.core.client.form.Field<T>
-
- com.sencha.gxt.widget.core.client.form.ValueBaseField<T>
-
- com.sencha.gxt.widget.core.client.form.TriggerField<T>
-
- com.sencha.gxt.widget.core.client.form.ComboBox<T>
-
- Type Parameters:
T- the data type
- All Implemented Interfaces:
com.google.gwt.editor.client.Editor<T>,com.google.gwt.editor.client.HasEditorDelegate<T>,com.google.gwt.editor.client.HasEditorErrors<T>,com.google.gwt.editor.client.LeafValueEditor<T>,com.google.gwt.editor.client.ValueAwareEditor<T>,com.google.gwt.event.dom.client.HasChangeHandlers,com.google.gwt.event.dom.client.HasKeyDownHandlers,com.google.gwt.event.dom.client.HasKeyPressHandlers,com.google.gwt.event.dom.client.HasKeyUpHandlers,com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.logical.shared.HasBeforeSelectionHandlers<T>,com.google.gwt.event.logical.shared.HasResizeHandlers,com.google.gwt.event.logical.shared.HasSelectionHandlers<T>,com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>,com.google.gwt.event.shared.HasHandlers,com.google.gwt.i18n.client.AutoDirectionHandler.Target,com.google.gwt.i18n.client.HasDirection,com.google.gwt.i18n.shared.HasDirectionEstimator,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.TakesValue<T>,com.google.gwt.user.client.ui.HasEnabled,com.google.gwt.user.client.ui.HasName,com.google.gwt.user.client.ui.HasText,com.google.gwt.user.client.ui.HasValue<T>,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.IsWidget,com.google.gwt.view.client.HasKeyProvider<T>,HasGestureRecognizers,BeforeHideEvent.HasBeforeHideHandlers,BeforeQueryEvent.HasBeforeQueryHandlers<T>,BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler,BeforeShowEvent.HasBeforeShowHandlers,BlurEvent.HasBlurHandlers,CollapseEvent.HasCollapseHandlers,DisableEvent.HasDisableHandlers,EnableEvent.HasEnableHandlers,ExpandEvent.HasExpandHandlers,FocusEvent.HasFocusHandlers,HideEvent.HasHideHandlers,InvalidEvent.HasInvalidHandlers,MoveEvent.HasMoveHandlers,ParseErrorEvent.HasParseErrorHandlers,ShowContextMenuEvent.HasShowContextMenuHandler,ShowEvent.HasShowHandlers,TriggerClickEvent.HasTriggerClickHandlers,ValidEvent.HasValidHandlers,HasErrorHandler,IsField<T>,HasFocusSupport,HasItemId
- Direct Known Subclasses:
SimpleComboBox,TimeField
public class ComboBox<T> extends TriggerField<T> implements com.google.gwt.event.logical.shared.HasBeforeSelectionHandlers<T>, com.google.gwt.event.logical.shared.HasSelectionHandlers<T>, ExpandEvent.HasExpandHandlers, CollapseEvent.HasCollapseHandlers, BeforeQueryEvent.HasBeforeQueryHandlers<T>
A combobox control with support for autocomplete, remote loading, and many other features.
A ComboBox is like a combination of a traditional HTML text <input> field and a <select> field; the user is able to type freely into the field, and/or pick values from a dropdown selection list. The user can input any value by default, even if it does not appear in the selection list; to prevent free-form values and restrict them to items in the list, set
setForceSelection(boolean)to true.When not forcing a selection (
setForceSelection(boolean))CellComponent.getValue()can return null even if the user has typed text into the field if that text cannot be tied to a model from from the combo's store. In this case, you can useValueBaseField.getText()to get the fields string value.The selection list's options are populated from any
ListStore. If the selection list is not otherwise in a list store, you may find it easier to useSimpleComboBox.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.form.Field
Field.FieldStyles
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
-
Constructor Summary
Constructors Constructor Description ComboBox(ComboBoxCell<T> cell)Creates a new combo box with the given cell.ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider)Creates a combo box that renders all items with the given label provider.ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, com.google.gwt.text.shared.SafeHtmlRenderer<T> renderer)Creates a combo box that renders the input value with the label provider and the drop down values with the renderer.ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, com.google.gwt.text.shared.SafeHtmlRenderer<T> renderer, TriggerFieldCell.TriggerFieldAppearance appearance)Creates a combo box that renders the input value with the label provider and the drop down values with the renderer.ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, TriggerFieldCell.TriggerFieldAppearance appearance)Creates a combo box that renders all items with the given label provider.ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, ListView<T,?> listView)Creates a combo box that renders the input value with the label provider.ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, ListView<T,?> listView, TriggerFieldCell.TriggerFieldAppearance appearance)Creates a combo box that renders the input value with the label provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistrationaddBeforeQueryHandler(BeforeQueryEvent.BeforeQueryHandler<T> handler)Adds aBeforeQueryEvent.BeforeQueryHandlerhandler forBeforeQueryEventevents.com.google.gwt.event.shared.HandlerRegistrationaddBeforeSelectionHandler(com.google.gwt.event.logical.shared.BeforeSelectionHandler<T> handler)com.google.gwt.event.shared.HandlerRegistrationaddCollapseHandler(CollapseEvent.CollapseHandler handler)Adds aCollapseEvent.CollapseHandlerhandler forCollapseEventevents.com.google.gwt.event.shared.HandlerRegistrationaddExpandHandler(ExpandEvent.ExpandHandler handler)Adds aExpandEvent.ExpandHandlerhandler forExpandEventevents.com.google.gwt.event.shared.HandlerRegistrationaddSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<T> handler)voidclear()Clears the value from the field.voidcollapse()Hides the dropdown list if it is currently expanded.voiddoQuery(String query, boolean force)Execute a query to filter the dropdown list.voidexpand()Expands the dropdown list if it is currently hidden.StringgetAllQuery()Returns the all query.ComboBoxCell<T>getCell()Get theCellwrapped by this widget.LabelProvider<? super T>getLabelProvider()Returns the combo's label provider.ListView<T,?>getListView()Returns the combo's list view.Loader<?,?>getLoader()Returns the combo's loader.intgetMaxHeight()Returns the dropdown list's max height.intgetMinChars()Returns the minimum characters used for autocomplete and typeahead.intgetMinListWidth()Returns the dropdown list's minimum width.intgetPageSize()Returns the page size.intgetQueryDelay()Returns the query delay.ListStore<T>getStore()Returns the combo's list store.ComboBoxCell.TriggerActiongetTriggerAction()Returns the trigger action.intgetTypeAheadDelay()Returns the type ahead delay in milliseconds.booleanisExpanded()Returns true if the dropdown is expanded.booleanisForceSelection()Returns true if the field's value is forced to one of the value in the list.booleanisTypeAhead()Returns true if type ahead is enabled.booleanisUseQueryCache()Returns the state if the query cache is used or not.voidselect(int index)Select an item in the dropdown list by its numeric index in the list.voidselect(T item)Select an item in the dropdown list.voidsetAllQuery(String allQuery)The text query to send to the server to return all records for the list with no filtering (defaults to '').voidsetExpanded(boolean expand)Sets the panel's expand state.voidsetForceSelection(boolean forceSelection)Sets whether the combo's value is restricted to one of the values in the list, false to allow the user to set arbitrary text into the field (defaults to false).voidsetLoader(Loader<?,?> loader)Sets the comobo's loader.voidsetLoadingIndicator(com.google.gwt.safehtml.shared.SafeHtml html)Sets the loading indicator html to be displayed during a load request.voidsetLoadingIndicator(String text)Sets the loading indicator text to be displayed during a load request.voidsetMaxHeight(int maxHeight)Sets the maximum height in pixels of the dropdown list before scrollbars are shown (defaults to 300).voidsetMinChars(int minChars)Sets the minimum number of characters the user must type before autocomplete and typeahead active (defaults to 4 if remote, or 0 if local).voidsetMinListWidth(int minListWidth)Sets the minimum width of the dropdown list in pixels (defaults to 70, will be ignored if listWidth has a higher value).voidsetPageSize(int pageSize)Sets the page size.voidsetQueryDelay(int queryDelay)The length of time in milliseconds to delay between the start of typing and sending the query to filter the dropdown list.voidsetQueryMatcher(ComboBoxCell.QueryMatcher<T> queryMatcher)Filter the items using this query matcher.voidsetStore(ListStore<T> store)Sets the combo's store.voidsetTriggerAction(ComboBoxCell.TriggerAction triggerAction)The action to execute when the trigger field is activated.voidsetTypeAhead(boolean typeAhead)True to populate and autoselect the remainder of the text being typed after a configurable delay (setTypeAheadDelay(int)) if it matches a known value (defaults to false)voidsetTypeAheadDelay(int typeAheadDelay)The length of time in milliseconds to wait until the typeahead text is displayed if typeAhead = true (defaults to 250).voidsetUseQueryCache(boolean useQueryCache)Set this to false to disable the last query cache (defaults to true).-
Methods inherited from class com.sencha.gxt.widget.core.client.form.TriggerField
addTriggerClickHandler, isEditable, isFinishEditOnEnter, isMonitorTab, setEditable, setFinishEditOnEnter, setHideTrigger, setMonitorTab
-
Methods inherited from class com.sencha.gxt.widget.core.client.form.ValueBaseField
addChangeHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addParseErrorHandler, getCurrentValue, getCursorPos, getDirection, getDirectionEstimator, getEmptyText, getPropertyEditor, getSelectedText, getSelectionLength, getText, getValueOrThrow, isAllowBlank, isClearValueOnParseError, isCurrentValid, isCurrentValid, isReadOnly, isSelectOnFocus, select, selectAll, setAllowBlank, setClearValueOnParseError, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setEmptyText, setId, setPropertyEditor, setReadOnly, setSelectionRange, setSelectOnFocus, setTabIndex, setText, setValue, validateCurrent
-
Methods inherited from class com.sencha.gxt.widget.core.client.form.Field
addInvalidHandler, addValidator, addValidHandler, addValueChangeHandler, clearInvalid, finishEditing, flush, forceInvalid, getErrors, getErrorSupport, getName, getOriginalValue, getValidateOnBlur, getValidationDelay, getValidators, isAutoValidate, isEditing, isValid, isValid, markInvalid, onBrowserEvent, onPropertyChange, removeValidator, reset, setAutoValidate, setDelegate, setErrorSupport, setName, setOriginalValue, setValidateOnBlur, setValidationDelay, setValue, showErrors, validate, validate
-
Methods inherited from class com.sencha.gxt.widget.core.client.cell.CellComponent
getElement, getKeyProvider, getValue, redraw, setValue
-
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideToolTip, isAdjustSize, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, removeGestureRecognizer, removeToolTip, setAdjustSize, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sencha.gxt.widget.core.client.event.BlurEvent.HasBlurHandlers
addBlurHandler
-
-
-
-
Constructor Detail
-
ComboBox
public ComboBox(ComboBoxCell<T> cell)
Creates a new combo box with the given cell.- Parameters:
cell- the cell
-
ComboBox
@UiConstructor public ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider)
Creates a combo box that renders all items with the given label provider.- Parameters:
store- the store containing the data that can be selectedlabelProvider- converts the current model type into a string value to display in the text box
-
ComboBox
public ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, ListView<T,?> listView)
Creates a combo box that renders the input value with the label provider.- Parameters:
store- the store containing the data that can be selectedlabelProvider- converts the current model type into a string value to display in the text boxlistView- the list view
-
ComboBox
public ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, ListView<T,?> listView, TriggerFieldCell.TriggerFieldAppearance appearance)
Creates a combo box that renders the input value with the label provider.- Parameters:
store- the store containing the data that can be selectedlabelProvider- converts the current model type into a string value to display in the text boxlistView- the list viewappearance- the appearance
-
ComboBox
public ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, com.google.gwt.text.shared.SafeHtmlRenderer<T> renderer)
Creates a combo box that renders the input value with the label provider and the drop down values with the renderer.- Parameters:
store- the store containing the data that can be selectedlabelProvider- converts the current model type into a string value to display in the text boxrenderer- draws the current model as html in the drop down
-
ComboBox
public ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, com.google.gwt.text.shared.SafeHtmlRenderer<T> renderer, TriggerFieldCell.TriggerFieldAppearance appearance)
Creates a combo box that renders the input value with the label provider and the drop down values with the renderer.- Parameters:
store- the store containing the data that can be selectedlabelProvider- converts the current model type into a string value to display in the text boxrenderer- draws the current model as html in the drop downappearance- the appearance
-
ComboBox
public ComboBox(ListStore<T> store, LabelProvider<? super T> labelProvider, TriggerFieldCell.TriggerFieldAppearance appearance)
Creates a combo box that renders all items with the given label provider.- Parameters:
store- the store containing the data that can be selectedlabelProvider- converts the current model type into a string value to display in the text boxappearance- the appearance
-
-
Method Detail
-
addBeforeQueryHandler
public com.google.gwt.event.shared.HandlerRegistration addBeforeQueryHandler(BeforeQueryEvent.BeforeQueryHandler<T> handler)
Description copied from interface:BeforeQueryEvent.HasBeforeQueryHandlersAdds aBeforeQueryEvent.BeforeQueryHandlerhandler forBeforeQueryEventevents.- Specified by:
addBeforeQueryHandlerin interfaceBeforeQueryEvent.HasBeforeQueryHandlers<T>- Parameters:
handler- the handler- Returns:
- the registration for the event
-
addBeforeSelectionHandler
public com.google.gwt.event.shared.HandlerRegistration addBeforeSelectionHandler(com.google.gwt.event.logical.shared.BeforeSelectionHandler<T> handler)
- Specified by:
addBeforeSelectionHandlerin interfacecom.google.gwt.event.logical.shared.HasBeforeSelectionHandlers<T>
-
addCollapseHandler
public com.google.gwt.event.shared.HandlerRegistration addCollapseHandler(CollapseEvent.CollapseHandler handler)
Description copied from interface:CollapseEvent.HasCollapseHandlersAdds aCollapseEvent.CollapseHandlerhandler forCollapseEventevents.- Specified by:
addCollapseHandlerin interfaceCollapseEvent.HasCollapseHandlers- Parameters:
handler- the handler- Returns:
- the registration for the event
-
addExpandHandler
public com.google.gwt.event.shared.HandlerRegistration addExpandHandler(ExpandEvent.ExpandHandler handler)
Description copied from interface:ExpandEvent.HasExpandHandlersAdds aExpandEvent.ExpandHandlerhandler forExpandEventevents.- Specified by:
addExpandHandlerin interfaceExpandEvent.HasExpandHandlers- Parameters:
handler- the handler- Returns:
- the registration for the event
-
addSelectionHandler
public com.google.gwt.event.shared.HandlerRegistration addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<T> handler)
- Specified by:
addSelectionHandlerin interfacecom.google.gwt.event.logical.shared.HasSelectionHandlers<T>
-
clear
public void clear()
Description copied from interface:IsFieldClears the value from the field.- Specified by:
clearin interfaceIsField<T>- Overrides:
clearin classValueBaseField<T>- See Also:
to remove validation messages,to restore to original value and remove validation messages
-
collapse
public void collapse()
Hides the dropdown list if it is currently expanded.
-
doQuery
public void doQuery(String query, boolean force)
Execute a query to filter the dropdown list. Fires the BeforeQuery event prior to performing the query allowing the query action to be canceled if needed.- Parameters:
query- the queryforce- true to force the query to execute even if there are currently fewer characters in the field than the minimum specified by the minChars config option. It also clears any filter previously saved in the current store
-
expand
public void expand()
Expands the dropdown list if it is currently hidden.
-
getAllQuery
public String getAllQuery()
Returns the all query.- Returns:
- the all query
-
getCell
public ComboBoxCell<T> getCell()
Description copied from class:CellComponentGet theCellwrapped by this widget.- Overrides:
getCellin classTriggerField<T>- Returns:
- the
Cellbeing wrapped
-
getLabelProvider
public LabelProvider<? super T> getLabelProvider()
Returns the combo's label provider.- Returns:
- the label provider
-
getListView
public ListView<T,?> getListView()
Returns the combo's list view.- Returns:
- the list view
-
getLoader
public Loader<?,?> getLoader()
Returns the combo's loader.- Returns:
- the loader or null if not set
-
getMaxHeight
public int getMaxHeight()
Returns the dropdown list's max height.- Returns:
- the max height
-
getMinChars
public int getMinChars()
Returns the minimum characters used for autocomplete and typeahead.- Returns:
- the minimum number of characters
-
getMinListWidth
public int getMinListWidth()
Returns the dropdown list's minimum width.- Returns:
- the minimum width
-
getPageSize
public int getPageSize()
Returns the page size.- Returns:
- the page size
-
getTriggerAction
public ComboBoxCell.TriggerAction getTriggerAction()
Returns the trigger action.- Returns:
- the trigger action
-
getTypeAheadDelay
public int getTypeAheadDelay()
Returns the type ahead delay in milliseconds.- Returns:
- the type ahead delay
-
isUseQueryCache
public boolean isUseQueryCache()
Returns the state if the query cache is used or not.- Returns:
- the useQueryCache state
-
getQueryDelay
public int getQueryDelay()
Returns the query delay.- Returns:
- the query delay
-
isExpanded
public boolean isExpanded()
Returns true if the dropdown is expanded.- Returns:
- the expand state
-
isForceSelection
public boolean isForceSelection()
Returns true if the field's value is forced to one of the value in the list.- Returns:
- the force selection state
-
isTypeAhead
public boolean isTypeAhead()
Returns true if type ahead is enabled.- Returns:
- the type ahead state
-
select
public void select(int index)
Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire. The list must expanded for this function to work, otherwise use #setValue.- Parameters:
index- the index of the item to select
-
select
public void select(T item)
Select an item in the dropdown list. This function does NOT cause the select event to fire. The list must expanded for this function to work, otherwise use #setValue.- Parameters:
item- the item to select
-
setAllQuery
public void setAllQuery(String allQuery)
The text query to send to the server to return all records for the list with no filtering (defaults to '').- Parameters:
allQuery- the all query
-
setExpanded
public void setExpanded(boolean expand)
Sets the panel's expand state.- Parameters:
expand- true to expand
-
setForceSelection
public void setForceSelection(boolean forceSelection)
Sets whether the combo's value is restricted to one of the values in the list, false to allow the user to set arbitrary text into the field (defaults to false).- Parameters:
forceSelection- true to force selection
-
setLoader
public void setLoader(Loader<?,?> loader)
Sets the comobo's loader. Keep in mindsetMinChars(int)(defaults to 4 if remote, or 0 if local) when using the loader, as it will only load when the min amount of characters has been met.- Parameters:
loader- the loader
-
setMaxHeight
public void setMaxHeight(int maxHeight)
Sets the maximum height in pixels of the dropdown list before scrollbars are shown (defaults to 300).- Parameters:
maxHeight- the max hieght
-
setLoadingIndicator
public void setLoadingIndicator(com.google.gwt.safehtml.shared.SafeHtml html)
Sets the loading indicator html to be displayed during a load request.- The
setLoader(Loader)has to be set for this use. - The css class name 'loading-indicator' can style the loading indicator html.
- Parameters:
html- the loading html
- The
-
setLoadingIndicator
public void setLoadingIndicator(String text)
Sets the loading indicator text to be displayed during a load request.- The
setLoader(Loader)has to be set for this use. - The css class name 'loading-indicator' can style the loading indicator text.
- Parameters:
text- the loading text
- The
-
setMinChars
public void setMinChars(int minChars)
Sets the minimum number of characters the user must type before autocomplete and typeahead active (defaults to 4 if remote, or 0 if local).- Parameters:
minChars- minimum number of characters before autocomplete and typeahead are active
-
setMinListWidth
public void setMinListWidth(int minListWidth)
Sets the minimum width of the dropdown list in pixels (defaults to 70, will be ignored if listWidth has a higher value).- Parameters:
minListWidth- the min width
-
setPageSize
public void setPageSize(int pageSize)
Sets the page size. Only applies when using a paging toolbar.- Parameters:
pageSize- the page size
-
setStore
public void setStore(ListStore<T> store)
Sets the combo's store.- Parameters:
store- the store
-
setTriggerAction
public void setTriggerAction(ComboBoxCell.TriggerAction triggerAction)
The action to execute when the trigger field is activated. UseComboBoxCell.TriggerAction.ALLto run the query specified by the allQuery which can be set usingsetAllQuery(String)(defaults toComboBoxCell.TriggerAction.QUERY).- Parameters:
triggerAction- the trigger action
-
setTypeAhead
public void setTypeAhead(boolean typeAhead)
True to populate and autoselect the remainder of the text being typed after a configurable delay (setTypeAheadDelay(int)) if it matches a known value (defaults to false)- Parameters:
typeAhead- true to enable type ahead
-
setTypeAheadDelay
public void setTypeAheadDelay(int typeAheadDelay)
The length of time in milliseconds to wait until the typeahead text is displayed if typeAhead = true (defaults to 250).- Parameters:
typeAheadDelay- the type ahead delay
-
setUseQueryCache
public void setUseQueryCache(boolean useQueryCache)
Set this to false to disable the last query cache (defaults to true). When set to false the store gets queried on each expand for the data that should get displayed in the list. If you use a loader, than each time the ComboBox gets expanded, the server gets asked for the data. You want to do this for example, if you filter the content of this ComboBox against some selection in another field.- Parameters:
useQueryCache- the useQueryCache to set
-
setQueryMatcher
public void setQueryMatcher(ComboBoxCell.QueryMatcher<T> queryMatcher)
Filter the items using this query matcher.- Parameters:
queryMatcher- the QueryMatcher- Since:
- 4.0.3
-
setQueryDelay
public void setQueryDelay(int queryDelay)
The length of time in milliseconds to delay between the start of typing and sending the query to filter the dropdown list.- Parameters:
queryDelay- the query delay
-
-