org.apache.myfaces.tobago.component
Class UISuggest

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.apache.myfaces.tobago.internal.component.AbstractUISuggest
              extended by org.apache.myfaces.tobago.component.UISuggest
All Implemented Interfaces:
EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, InputSuggest, InputSuggest2, SupportsMarkup

public class UISuggest
extends AbstractUISuggest
implements SupportsMarkup

Renders a list of suggested texts for a given input field. Basic features:

UIComponent class, generated from template component2.0.stg with class SuggestTagDeclaration.


Field Summary
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Constructor Summary
UISuggest()
           
 
Method Summary
 Markup getCurrentMarkup()
           
 Integer getDelay()
          Time in milli seconds before the list will be requested (by AJAX).
 String getFamily()
           
 SuggestFilter getFilter()
          TODO: not implemented yet

Additional client side filtering of the result list.

 Markup getMarkup()
           
 Integer getMaximumItems()
          The maximum number of item to display in the drop down list.
 Integer getMinimumCharacters()
          Minimum number of characters to type before the list will be requested.
 javax.faces.el.MethodBinding getSuggestMethod()
          Deprecated. since 2.0.0
 javax.el.MethodExpression getSuggestMethodExpression()
           
 Integer getTotalCount()
          The real size of the result list.
 boolean isUpdate()
          TODO: not implemented yet

Should the list be updated while typing (via AJAX).

 Object saveState(javax.faces.context.FacesContext context)
           
 void setCurrentMarkup(Markup currentMarkup)
           
 void setDelay(Integer delay)
           
 void setFilter(SuggestFilter filter)
           
 void setMarkup(Markup markup)
           
 void setMaximumItems(Integer maximumItems)
           
 void setMinimumCharacters(Integer minimumCharacters)
           
 void setSuggestMethod(javax.faces.el.MethodBinding suggestMethod)
          Deprecated. since 2.0.0
 void setSuggestMethodExpression(javax.el.MethodExpression suggestMethod)
           
 void setTotalCount(Integer totalCount)
           
 void setUpdate(boolean update)
           
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

UISuggest

public UISuggest()
Method Detail

getFamily

public String getFamily()
Overrides:
getFamily in class AbstractUISuggest

isUpdate

public boolean isUpdate()
TODO: not implemented yet

Should the list be updated while typing (via AJAX). This is the default behaviour. If you set this value to false, please set the minimumCharacters="0".
Default: true


setUpdate

public void setUpdate(boolean update)

getMaximumItems

public Integer getMaximumItems()
The maximum number of item to display in the drop down list.
Default: 10


setMaximumItems

public void setMaximumItems(Integer maximumItems)

getSuggestMethod

@Deprecated
public javax.faces.el.MethodBinding getSuggestMethod()
Deprecated. since 2.0.0

Specified by:
getSuggestMethod in interface InputSuggest

setSuggestMethod

@Deprecated
public void setSuggestMethod(javax.faces.el.MethodBinding suggestMethod)
Deprecated. since 2.0.0

Specified by:
setSuggestMethod in interface InputSuggest

getSuggestMethodExpression

public javax.el.MethodExpression getSuggestMethodExpression()
Specified by:
getSuggestMethodExpression in interface InputSuggest2

setSuggestMethodExpression

public void setSuggestMethodExpression(javax.el.MethodExpression suggestMethod)
Specified by:
setSuggestMethodExpression in interface InputSuggest2

getMarkup

public Markup getMarkup()
Specified by:
getMarkup in interface SupportsMarkup

setMarkup

public void setMarkup(Markup markup)
Specified by:
setMarkup in interface SupportsMarkup

getTotalCount

public Integer getTotalCount()
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.
Default: -1


setTotalCount

public void setTotalCount(Integer totalCount)

getCurrentMarkup

public Markup getCurrentMarkup()
Specified by:
getCurrentMarkup in interface SupportsMarkup

setCurrentMarkup

public void setCurrentMarkup(Markup currentMarkup)
Specified by:
setCurrentMarkup in interface SupportsMarkup

getMinimumCharacters

public Integer getMinimumCharacters()
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 set
update="false"
this value should be 0.
Default: 1


setMinimumCharacters

public void setMinimumCharacters(Integer minimumCharacters)
Specified by:
setMinimumCharacters in class AbstractUISuggest

getDelay

public Integer getDelay()
Time in milli seconds before the list will be requested (by AJAX).
Default: 300


setDelay

public void setDelay(Integer delay)
Specified by:
setDelay in class AbstractUISuggest

getFilter

public SuggestFilter getFilter()
TODO: not implemented yet

Additional 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: SuggestFilter.ALL
Allowed Values: all,prefix,contains


setFilter

public void setFilter(SuggestFilter filter)
Specified by:
setFilter in class AbstractUISuggest

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.