Class UISuggest
java.lang.Object
jakarta.faces.component.UIComponent
jakarta.faces.component.UIComponentBase
org.apache.myfaces.tobago.internal.component.AbstractUISuggest
org.apache.myfaces.tobago.component.UISuggest
- All Implemented Interfaces:
- jakarta.faces.component.behavior.ClientBehaviorHolder,- jakarta.faces.component.PartialStateHolder,- jakarta.faces.component.StateHolder,- jakarta.faces.component.TransientStateHolder,- jakarta.faces.event.ComponentSystemEventListener,- jakarta.faces.event.FacesListener,- jakarta.faces.event.SystemEventListenerHolder,- EventListener
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]
component.stg with class
 SuggestTagDeclaration.- 
Field SummaryFieldsFields inherited from class jakarta.faces.component.UIComponentATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, FACETS_KEY, VIEW_LOCATION_KEY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetDelay()Time in milliseconds before the list will be requested (by AJAX).Additional client side filtering of the result list.The maximum number of item to display in the drop-down list.Minimum number of characters to type before the list will be requested.The real size of the result list.booleanBy default, dropdown menus are rendered in the '.tobago-page-menuStore'.booleanisUpdate()Should the list be updated while typing (via AJAX).voidrestoreState(jakarta.faces.context.FacesContext context, Object state) voidvoidsetFilter(SuggestFilter filter) voidsetLocalMenu(boolean localMenu) voidsetMaximumItems(Integer maximumItems) voidsetMinimumCharacters(Integer minimumCharacters) voidsetTotalCount(Integer totalCount) voidsetUpdate(boolean update) Methods inherited from class org.apache.myfaces.tobago.internal.component.AbstractUISuggestgetQuery, setQueryMethods inherited from class jakarta.faces.component.UIComponentBaseaddClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, visitTreeMethods inherited from class jakarta.faces.component.UIComponentgetClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEventMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.faces.component.behavior.ClientBehaviorHolderaddClientBehavior, getClientBehaviors, getDefaultEventName, getEventNames
- 
Field Details- 
COMPONENT_TYPE
- 
COMPONENT_FAMILY- See Also:
 
 
- 
- 
Constructor Details- 
UISuggestpublic UISuggest()
 
- 
- 
Method Details- 
getFamily- Overrides:
- getFamilyin class- AbstractUISuggest
 
- 
getFilterAdditional 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);
 Default:contains
 Allowed Values:all,prefix,contains- Specified by:
- getFilterin class- AbstractUISuggest
 
- 
setFilter- Specified by:
- setFilterin class- AbstractUISuggest
 
- 
getDelayTime in milliseconds before the list will be requested (by AJAX).
 Default:200- Specified by:
- getDelayin class- AbstractUISuggest
 
- 
setDelay- Specified by:
- setDelayin class- AbstractUISuggest
 
- 
getMinimumCharactersMinimum number of characters to type before the list will be requested. If the value is 0, there will be sent an initial list to the client. So, if you setupdate="false" this value should be 0.
 Default:1- Specified by:
- getMinimumCharactersin class- AbstractUISuggest
 
- 
setMinimumCharacters- Specified by:
- setMinimumCharactersin class- AbstractUISuggest
 
- 
isUpdatepublic boolean isUpdate()Should the list be updated while typing (via AJAX). This is the default behavior. 
 Default:true- Specified by:
- isUpdatein class- AbstractUISuggest
 
- 
setUpdatepublic void setUpdate(boolean update) 
- 
isLocalMenupublic boolean isLocalMenu()By default, dropdown menus are rendered in the '.tobago-page-menuStore'. If localMenu=true, the dropdown menu is rendered on the component. 
 Default:false- Specified by:
- isLocalMenuin class- AbstractUISuggest
 
- 
setLocalMenupublic void setLocalMenu(boolean localMenu) 
- 
getTotalCountThe 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.
 Default:-1- Specified by:
- getTotalCountin class- AbstractUISuggest
 
- 
setTotalCount
- 
getMaximumItemsThe maximum number of item to display in the drop-down list.
 Default:10- Specified by:
- getMaximumItemsin class- AbstractUISuggest
 
- 
setMaximumItems
- 
restoreState- Specified by:
- restoreStatein interface- jakarta.faces.component.StateHolder
- Overrides:
- restoreStatein class- jakarta.faces.component.UIComponentBase
 
 
-