com.liferay.faces.alloy.component.autocomplete
Class AutoCompleteBase

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by javax.faces.component.html.HtmlInputText
                      extended by com.liferay.faces.alloy.component.inputtext.InputTextBase
                          extended by com.liferay.faces.alloy.component.autocomplete.AutoCompleteBase
All Implemented Interfaces:
com.liferay.faces.util.component.ClientComponent, com.liferay.faces.util.component.Styleable, EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.EditableValueHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder
Direct Known Subclasses:
AutoComplete

@Generated(value="com.liferay.alloy.tools.builder.FacesBuilder")
public abstract class AutoCompleteBase
extends InputTextBase
implements com.liferay.faces.util.component.Styleable, com.liferay.faces.util.component.ClientComponent

Author:
Bruno Basto, Kyle Stiemann

Nested Class Summary
protected static class AutoCompleteBase.AutoCompletePropertyKeys
           
 
Nested classes/interfaces inherited from class javax.faces.component.html.HtmlInputText
javax.faces.component.html.HtmlInputText.PropertyKeys
 
Field Summary
static String COMPONENT_TYPE
           
static String RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME
 
Fields inherited from class javax.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
 
Fields inherited from interface com.liferay.faces.util.component.Styleable
STYLE, STYLE_CLASS
 
Fields inherited from interface com.liferay.faces.util.component.ClientComponent
CLIENT_KEY
 
Constructor Summary
AutoCompleteBase()
           
 
Method Summary
 Boolean getAutoScroll()
          autoScroll attribute description:
 Boolean getCircular()
          circular attribute description:
 String getClientCustomFilter()
          clientCustomFilter attribute description:
 String getClientFilterType()
          clientFilterType attribute description:
 String getClientKey()
          clientKey attribute description:
 Integer getDelay()
          delay attribute description:
 String getDelimiter()
          delimiter attribute description:
 String getHeight()
          height attribute description:
 String getHighlighterType()
          highlighterType attribute description:
 Integer getMaxItems()
          maxItems attribute description:
 Integer getMinChars()
          minChars attribute description:
 javax.el.MethodExpression getServerCustomFilter()
          serverCustomFilter attribute description:
 String getServerFilterType()
          serverFilterType attribute description:
 String getStyleClass()
          styleClass attribute description:
 String getWidth()
          width attribute description:
 boolean isActivateFirstItem()
          activateFirstItem attribute description:
 boolean isListItemRequired()
          listItemRequired attribute description:
 boolean isTabSelect()
          tabSelect attribute description:
 void setActivateFirstItem(boolean activateFirstItem)
          activateFirstItem attribute description:
 void setAutoScroll(Boolean autoScroll)
          autoScroll attribute description:
 void setCircular(Boolean circular)
          circular attribute description:
 void setClientCustomFilter(String clientCustomFilter)
          clientCustomFilter attribute description:
 void setClientFilterType(String clientFilterType)
          clientFilterType attribute description:
 void setClientKey(String clientKey)
          clientKey attribute description:
 void setDelay(Integer delay)
          delay attribute description:
 void setDelimiter(String delimiter)
          delimiter attribute description:
 void setHeight(String height)
          height attribute description:
 void setHighlighterType(String highlighterType)
          highlighterType attribute description:
 void setListItemRequired(boolean listItemRequired)
          listItemRequired attribute description:
 void setMaxItems(Integer maxItems)
          maxItems attribute description:
 void setMinChars(Integer minChars)
          minChars attribute description:
 void setServerCustomFilter(javax.el.MethodExpression serverCustomFilter)
          serverCustomFilter attribute description:
 void setServerFilterType(String serverFilterType)
          serverFilterType attribute description:
 void setTabSelect(boolean tabSelect)
          tabSelect attribute description:
 void setWidth(String width)
          width attribute description:
 
Methods inherited from class com.liferay.faces.alloy.component.inputtext.InputTextBase
getLabel
 
Methods inherited from class javax.faces.component.html.HtmlInputText
getAccesskey, getAlt, getAutocomplete, getDefaultEventName, getDir, getEventNames, getLang, getMaxlength, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getRole, getSize, getStyle, getTabindex, getTitle, isDisabled, isReadonly, setAccesskey, setAlt, setAutocomplete, setDir, setDisabled, setLabel, setLang, setMaxlength, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setRole, setSize, setStyle, setStyleClass, setTabindex, setTitle
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getFamily, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.liferay.faces.util.component.Styleable
getStyle, setStyle, setStyleClass
 
Methods inherited from interface com.liferay.faces.util.component.ClientComponent
getClientId
 
Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

RENDERER_TYPE

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

AutoCompleteBase

public AutoCompleteBase()
Method Detail

isActivateFirstItem

public boolean isActivateFirstItem()

activateFirstItem attribute description:

When true, the first item in the list will be activated so that users can press TAB or ENTER to select it.


setActivateFirstItem

public void setActivateFirstItem(boolean activateFirstItem)

activateFirstItem attribute description:

When true, the first item in the list will be activated so that users can press TAB or ENTER to select it.


getAutoScroll

public Boolean getAutoScroll()

autoScroll attribute description:

When true, if the active option of the autoComplete is not in view, the view will be scrolled to ensure that the active option is displayed to the user.


setAutoScroll

public void setAutoScroll(Boolean autoScroll)

autoScroll attribute description:

When true, if the active option of the autoComplete is not in view, the view will be scrolled to ensure that the active option is displayed to the user.


getCircular

public Boolean getCircular()

circular attribute description:

When true, the autoComplete list will wrap around allowing users to use keyboard navigation to move from the top of the list to the bottom and vice versa. The default value is true.


setCircular

public void setCircular(Boolean circular)

circular attribute description:

When true, the autoComplete list will wrap around allowing users to use keyboard navigation to move from the top of the list to the bottom and vice versa. The default value is true.


getClientCustomFilter

public String getClientCustomFilter()

clientCustomFilter attribute description:

A callback which filters the client-side results. The callback must be a function which takes query and source arguments and returns an array of Strings as a result. The source argument recieved by this callback is an Array of Objects which contain three properties: display, raw, and text. Note: This attribute will be ignored if the serverCustomFilter or serverFilterType attributes are used.


setClientCustomFilter

public void setClientCustomFilter(String clientCustomFilter)

clientCustomFilter attribute description:

A callback which filters the client-side results. The callback must be a function which takes query and source arguments and returns an array of Strings as a result. The source argument recieved by this callback is an Array of Objects which contain three properties: display, raw, and text. Note: This attribute will be ignored if the serverCustomFilter or serverFilterType attributes are used.


getClientFilterType

public String getClientFilterType()

clientFilterType attribute description:

Specifies the type of filter that will be used for the autoComplete results. Valid values include:
  • charMatch
  • charMatchCase
  • phraseMatch
  • phraseMatchCase
  • startsWith
  • startsWithCase
  • subWordMatch
  • subWordMatchCase
  • wordMatch
  • wordMatchCase
Note: This attribute will be ignored if the serverCustomFilter, serverFilterType, or clientCustomFilter attributes are used.


setClientFilterType

public void setClientFilterType(String clientFilterType)

clientFilterType attribute description:

Specifies the type of filter that will be used for the autoComplete results. Valid values include:
  • charMatch
  • charMatchCase
  • phraseMatch
  • phraseMatchCase
  • startsWith
  • startsWithCase
  • subWordMatch
  • subWordMatchCase
  • wordMatch
  • wordMatchCase
Note: This attribute will be ignored if the serverCustomFilter, serverFilterType, or clientCustomFilter attributes are used.


getClientKey

public String getClientKey()

clientKey attribute description:

The key name that can be used to reference the component on the client.

Specified by:
getClientKey in interface com.liferay.faces.util.component.ClientComponent

setClientKey

public void setClientKey(String clientKey)

clientKey attribute description:

The key name that can be used to reference the component on the client.

Specified by:
setClientKey in interface com.liferay.faces.util.component.ClientComponent

getDelay

public Integer getDelay()

delay attribute description:

The delay in milliseconds before a request for filtering occurs. After the autoComplete receives input, it waits the specified number of milliseconds before sending a request for filtering it's source. If input occurs before the specified number of milliseconds has elapsed, the timer is reset.


setDelay

public void setDelay(Integer delay)

delay attribute description:

The delay in milliseconds before a request for filtering occurs. After the autoComplete receives input, it waits the specified number of milliseconds before sending a request for filtering it's source. If input occurs before the specified number of milliseconds has elapsed, the timer is reset.


getDelimiter

public String getDelimiter()

delimiter attribute description:

The string which delimits the part of the text that will have completion. For example, if delimiter=" ", then only the text after the final space will have completion. Note: if listItemRequired="true", this attribute is ignored.


setDelimiter

public void setDelimiter(String delimiter)

delimiter attribute description:

The string which delimits the part of the text that will have completion. For example, if delimiter=" ", then only the text after the final space will have completion. Note: if listItemRequired="true", this attribute is ignored.


getHeight

public String getHeight()

height attribute description:

The the height (in pixels) of the rendered autoComplete list.


setHeight

public void setHeight(String height)

height attribute description:

The the height (in pixels) of the rendered autoComplete list.


getHighlighterType

public String getHighlighterType()

highlighterType attribute description:

Specifies the type of highlighter that will be used for the autoComplete results. Valid values include:
  • charMatch
  • charMatchCase
  • phraseMatch
  • phraseMatchCase
  • startsWith
  • startsWithCase
  • subWordMatch
  • subWordMatchCase
  • wordMatch
  • wordMatchCase


setHighlighterType

public void setHighlighterType(String highlighterType)

highlighterType attribute description:

Specifies the type of highlighter that will be used for the autoComplete results. Valid values include:
  • charMatch
  • charMatchCase
  • phraseMatch
  • phraseMatchCase
  • startsWith
  • startsWithCase
  • subWordMatch
  • subWordMatchCase
  • wordMatch
  • wordMatchCase


isListItemRequired

public boolean isListItemRequired()

listItemRequired attribute description:

When true, the component will perform server-side validation to ensure that the value entered is on the list of completion items.


setListItemRequired

public void setListItemRequired(boolean listItemRequired)

listItemRequired attribute description:

When true, the component will perform server-side validation to ensure that the value entered is on the list of completion items.


getMaxItems

public Integer getMaxItems()

maxItems attribute description:

The maximum amount of autoComplete results.


setMaxItems

public void setMaxItems(Integer maxItems)

maxItems attribute description:

The maximum amount of autoComplete results.


getMinChars

public Integer getMinChars()

minChars attribute description:

The minimum length of input required to trigger a query.


setMinChars

public void setMinChars(Integer minChars)

minChars attribute description:

The minimum length of input required to trigger a query.


getServerCustomFilter

public javax.el.MethodExpression getServerCustomFilter()

serverCustomFilter attribute description:

A method that is executed when a query occurs. The method must be public, return a java.util.List<java.lang.String>, and takes a java.lang.String and a java.util.List<java.lang.String> as a arguments. The String passed to the method is the current query. The List<String> is an immutable list of unfiltered results. The method must return a List<String> which contains the filtered results.


setServerCustomFilter

public void setServerCustomFilter(javax.el.MethodExpression serverCustomFilter)

serverCustomFilter attribute description:

A method that is executed when a query occurs. The method must be public, return a java.util.List<java.lang.String>, and takes a java.lang.String and a java.util.List<java.lang.String> as a arguments. The String passed to the method is the current query. The List<String> is an immutable list of unfiltered results. The method must return a List<String> which contains the filtered results.


getServerFilterType

public String getServerFilterType()

serverFilterType attribute description:

Specifies the type of filter that will be used for the autoComplete results. Valid values include:
  • charMatch
  • charMatchCase
  • phraseMatch
  • phraseMatchCase
  • startsWith
  • startsWithCase
  • subWordMatch
  • subWordMatchCase
  • wordMatch
  • wordMatchCase
Note: This attribute will be ignored if the serverCustomFilter attribute is used.


setServerFilterType

public void setServerFilterType(String serverFilterType)

serverFilterType attribute description:

Specifies the type of filter that will be used for the autoComplete results. Valid values include:
  • charMatch
  • charMatchCase
  • phraseMatch
  • phraseMatchCase
  • startsWith
  • startsWithCase
  • subWordMatch
  • subWordMatchCase
  • wordMatch
  • wordMatchCase
Note: This attribute will be ignored if the serverCustomFilter attribute is used.


getStyleClass

public String getStyleClass()

styleClass attribute description:

List of CSS class names (separated by spaces) that are to be rendered within the class attribute.

Specified by:
getStyleClass in interface com.liferay.faces.util.component.Styleable
Overrides:
getStyleClass in class InputTextBase

isTabSelect

public boolean isTabSelect()

tabSelect attribute description:

When true, pressing TAB selects the active autoComplete option.


setTabSelect

public void setTabSelect(boolean tabSelect)

tabSelect attribute description:

When true, pressing TAB selects the active autoComplete option.


getWidth

public String getWidth()

width attribute description:

The the width (in pixels) of the rendered autoComplete list.


setWidth

public void setWidth(String width)

width attribute description:

The the width (in pixels) of the rendered autoComplete list.



Copyright © 2017 Liferay, Inc.. All rights reserved.