public final class AutoCompleteSettings extends Object implements IClusterable
AbstractAutoCompleteBehavior
. See the
documentation for the property accessors of this class for further information.
Default settings:
setting | default value |
---|---|
preselect | false |
maxHeightInPx | -1 |
showListOnEmptyInput | false |
Constructor and Description |
---|
AutoCompleteSettings() |
Modifier and Type | Method and Description |
---|---|
String |
getCssClassName()
Get CSS class name to add to the autocompleter markup container
|
boolean |
getIgnoreBordersWhenPositioning()
Indicates whether the popup positioning will take into account the borders of the input
element and its ancestors.
|
int |
getMaxHeightInPx()
Gets the maximum height of the autocomplete list in pixels.
|
int |
getMinInputLength() |
String |
getParameterName() |
boolean |
getPreselect()
Indicates whether the first item in the list is automatically selected when the autocomplete
list is shown.
|
boolean |
getShowCompleteListOnFocusGain()
Indicates whether the autocomplete list will be shown when the input field receives focus.
|
boolean |
getShowListOnEmptyInput()
Indicates whether the autocomplete list will be shown if the input is empty.
|
boolean |
getShowListOnFocusGain()
Indicates whether the autocomplete list will be shown when the input field receives focus.
|
int |
getThrottleDelay()
get the throttle delay how long the browser will wait before sending a request to the browser
after the user released a key.
|
boolean |
getUseSmartPositioning()
Indicates whether the popup positioning will take into account browser window visible area or
not.
|
boolean |
isAdjustInputWidth()
Tells if wicket should adjust the width of the autocompleter selection window to the width of
the related input field.
|
AutoCompleteSettings |
setAdjustInputWidth(boolean adjustInputWidth)
Adjust the width of the autocompleter selection window to the width of the related input
field.
|
AutoCompleteSettings |
setCssClassName(String cssClassName)
Sets an CSS class name to add to the autocompleter markup container
This makes it easier to have multiple autocompleters in your application with different style
and layout.
|
AutoCompleteSettings |
setIgnoreBordersWhenPositioning(boolean ignoreBordersWhenPositioning)
Sets whether the popup positioning will take into account the borders of the input element
and its ancestors (by including the
clientLeft and clientTop DOM
properties in the computation). |
AutoCompleteSettings |
setMaxHeightInPx(int maxHeightInPx)
Sets the maximum height in pixels of the autocomplete list.
|
AutoCompleteSettings |
setMinInputLength(int minInputLength)
Set the minimum input length required to display the autocomplete list
|
AutoCompleteSettings |
setParameterName(String parameterName)
Sets the name of the request parameter that will bring the value of the user input
|
AutoCompleteSettings |
setPreselect(boolean preselect)
Sets whether the first item in the autocomplete list should be selected when the autocomplete
list is shown.
|
AutoCompleteSettings |
setShowCompleteListOnFocusGain(boolean showCompleteListOnFocusGain)
Sets whether the list should be shown when the input field receives focus.
|
AutoCompleteSettings |
setShowListOnEmptyInput(boolean showListOnEmptyInput)
Sets whether the list should be shown when the input is empty.
|
AutoCompleteSettings |
setShowListOnFocusGain(boolean showListOnFocusGain)
Sets whether the list should be shown when the input field receives focus.
|
AutoCompleteSettings |
setThrottleDelay(int throttleDelay)
set the throttle delay how long the browser will wait before sending a request to the browser
after the user released a key.
|
AutoCompleteSettings |
setUseSmartPositioning(boolean useSmartPositioning)
Sets whether the popup positioning will take into account browser window visible area or not.
|
public boolean getPreselect()
public AutoCompleteSettings setPreselect(boolean preselect)
preselect
- the flagAutoCompleteSettings
public AutoCompleteSettings setThrottleDelay(int throttleDelay)
throttleDelay
- The delay in milliseconds.AutoCompleteSettings
public int getThrottleDelay()
public int getMaxHeightInPx()
-1
indicates that
the autocomplete list should have no maximum height.public AutoCompleteSettings setMaxHeightInPx(int maxHeightInPx)
The maximum height can also be specified via css (and by setting maxHeightInPx to -1):
div.wicket-aa-container { maxHeight: 100px; }Note that this does not work in IE6.
maxHeightInPx
- the maximum height in pixelsAutoCompleteSettings
public boolean getIgnoreBordersWhenPositioning()
public AutoCompleteSettings setIgnoreBordersWhenPositioning(boolean ignoreBordersWhenPositioning)
clientLeft
and clientTop
DOM
properties in the computation).ignoreBordersWhenPositioning
- the flagAutoCompleteSettings
.public boolean getUseSmartPositioning()
public boolean getShowListOnEmptyInput()
public AutoCompleteSettings setShowListOnEmptyInput(boolean showListOnEmptyInput)
showListOnEmptyInput
- the flagAutoCompleteSettings
public String getCssClassName()
null
if not usedpublic AutoCompleteSettings setCssClassName(String cssClassName)
cssClassName
- valid CSS class nameAutoCompleteSettings
.public boolean isAdjustInputWidth()
true
if the autocompleter should have the same size as the input field,
false
for default browser behaviorpublic AutoCompleteSettings setAdjustInputWidth(boolean adjustInputWidth)
adjustInputWidth
- true
if the autocompleter should have the same size as the input
field, false
for default browser behaviorAutoCompleteSettings
.public boolean getShowListOnFocusGain()
public AutoCompleteSettings setShowCompleteListOnFocusGain(boolean showCompleteListOnFocusGain)
showCompleteListOnFocusGain
- the flagAutoCompleteSettings
.public boolean getShowCompleteListOnFocusGain()
public AutoCompleteSettings setShowListOnFocusGain(boolean showListOnFocusGain)
showListOnFocusGain
- the flagAutoCompleteSettings
.public AutoCompleteSettings setUseSmartPositioning(boolean useSmartPositioning)
useSmartPositioning
- the flagAutoCompleteSettings
.public AutoCompleteSettings setParameterName(String parameterName)
parameterName
- the name of the request parameter that will bring the value of the user inputAutoCompleteSettings
public String getParameterName()
public int getMinInputLength()
public AutoCompleteSettings setMinInputLength(int minInputLength)
minInputLength
- the minimum input length required to display the autocomplete listAutoCompleteSettings
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.