Interface SuggestTagDeclaration
- All Superinterfaces:
HasBinding
,HasId
,HasIdBindingAndRendered
,IsRendered
Renders a list of suggested texts for a given input field.
Basic features:
- provide a list directly while rendering (not AJAX needed) [todo]
- update by typing (AJAX)
- minimum number of typed characters (to avoid useless requests)
- update delay (useful for optimization)
- filter on client side (useful for optimization) [todo]
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Time in milli seconds before the list will be requested (by AJAX).void
TODO: not implemented yetvoid
setMaximumItems
(String maximumItems) The maximum number of item to display in the drop down list.void
setMinimumCharacters
(String minimumCharacters) Minimum number of characters to type before the list will be requested.void
The query is the string typed by the user.void
setSuggestMethod
(String suggestMethod) Deprecated.since 3.0.0.void
setTotalCount
(String totalCount) The real size of the result list.void
TODO: not implemented yetMethods inherited from interface org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding
setBinding
Methods inherited from interface org.apache.myfaces.tobago.internal.taglib.declaration.IsRendered
setRendered
-
Method Details
-
setSuggestMethod
Deprecated.since 3.0.0. Please use an<tc:selectItems>
tag or a list of<tc:selectItem>
tags.MethodExpression
which generates a list of suggested input values based on the currently entered text, which could be retrieved via getSubmittedValue() on the UIIn. The expression has to evaluate to a public method which has a javax.faces.component.UIInput parameter and returns a List<String>, a List<org.apache.myfaces.tobago.model.AutoSuggestItem> or a org.apache.myfaces.tobago.model.AutoSuggestItems. -
setMinimumCharacters
Minimum number of characters to type before the list will be requested. If the value is 0, there will be send an initial list to the client. So, if you setupdate="false"
this value should be 0. -
setDelay
Time in milli seconds before the list will be requested (by AJAX). -
setMaximumItems
The maximum number of item to display in the drop down list. -
setTotalCount
The real size of the result list. Typically the result list will be cropped (in the backend) to save memory. This value can be set, to show the user there are more results for the given string. If the value is -1, no hint will be displayed. -
setFilter
TODO: not implemented yetAdditional client side filtering of the result list. This is useful when sending the full list initially to the client and setting
update=false
.Possible values are:
- all
- no filtering
- prefix
- checks if the suggested string starts with the typed text
- contains
- checks if the typed text is inside of the suggested string
The filter will only applied on the client side and only if server updated (by AJAX) are turned off (
update=false
); -
setUpdate
TODO: not implemented yetShould the list be updated while typing (via AJAX). This is the default behaviour. If you set this value to
false
, please set theminimumCharacters="0"
. -
setQuery
The query is the string typed by the user.
-