public class InputTags
extends javax.faces.component.html.HtmlInputText
implements org.primefaces.component.api.Widget, org.primefaces.component.api.InputHolder
Modifier and Type | Class and Description |
---|---|
static class |
InputTags.PropertyKeys |
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
static int |
DEFAULT_ANIMATE_DELETE |
static List<Object> |
DEFAULT_AVAILABLE_TAGS |
static boolean |
DEFAULT_CLICK_DELETE |
static String |
DEFAULT_DELIMITER |
static boolean |
DEFAULT_FORCE_LOWERCASE |
static int |
DEFAULT_MAX_LENGTH |
static int |
DEFAULT_MAX_TAGS |
static String |
DEFAULT_PLACEHOLDER |
static boolean |
DEFAULT_REMOVE_DUPLICATES |
static String |
DEFAULT_RENDERER |
static boolean |
DEFAULT_SHOW_ON_FOCUS |
static boolean |
DEFAULT_SORTABLE |
static boolean |
DEFAULT_STRING_MODEL |
static String |
INVALID_MESSAGE_ID |
static String |
INVALID_MESSAGE_ID_LENGTH |
static String |
INVALID_MESSAGE_ID_NOT_AVAILABLE |
static String |
INVALID_MESSAGE_ID_TAG_TOO_LONG |
static String |
STYLE_CLASS |
Constructor and Description |
---|
InputTags() |
getAccesskey, getAlt, getAutocomplete, getDefaultEventName, getDir, getLabel, getLang, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getRole, getSize, getStyle, getStyleClass, 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
addValidator, addValueChangeListener, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, 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
getConverter, getLocalValue, setConverter
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
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final String COMPONENT_FAMILY
public static final String COMPONENT_TYPE
public static final String DEFAULT_RENDERER
public static final String INVALID_MESSAGE_ID
public static final String INVALID_MESSAGE_ID_LENGTH
public static final String INVALID_MESSAGE_ID_NOT_AVAILABLE
public static final String INVALID_MESSAGE_ID_TAG_TOO_LONG
public static final String STYLE_CLASS
public static final int DEFAULT_ANIMATE_DELETE
public static final boolean DEFAULT_CLICK_DELETE
public static final String DEFAULT_DELIMITER
public static final boolean DEFAULT_FORCE_LOWERCASE
public static final int DEFAULT_MAX_LENGTH
public static final int DEFAULT_MAX_TAGS
public static final String DEFAULT_PLACEHOLDER
public static final boolean DEFAULT_SHOW_ON_FOCUS
public static final boolean DEFAULT_REMOVE_DUPLICATES
public static final boolean DEFAULT_SORTABLE
public static final boolean DEFAULT_STRING_MODEL
public Collection<String> getEventNames()
getEventNames
in interface javax.faces.component.behavior.ClientBehaviorHolder
getEventNames
in class javax.faces.component.html.HtmlInputText
public String getFamily()
getFamily
in class javax.faces.component.UIInput
public char getMainDelimiter()
getDelimiter()
s.public String getDelimiterPattern()
getDelimiter()
is ,;
, this
returns the pattern ,|;
.public List<?> getListValue()
UIInput.getValue()
is not a List
, convert to a
String
and split by the getMainDelimiter()
.public String resolveWidgetVar()
resolveWidgetVar
in interface org.primefaces.component.api.Widget
public String getInputClientId()
getInputClientId
in interface org.primefaces.component.api.InputHolder
public String getValidatableInputClientId()
getValidatableInputClientId
in interface org.primefaces.component.api.InputHolder
public String getLabelledBy()
getLabelledBy
in interface org.primefaces.component.api.InputHolder
public void setLabelledBy(String labelledBy)
setLabelledBy
in interface org.primefaces.component.api.InputHolder
public String getWidgetVar()
public void setWidgetVar(String widgetVar)
public int getMaxlength()
getMaxlength
in class javax.faces.component.html.HtmlInputText
public boolean isStringModel()
String
instead of a List
.
Defaults to false
.public void setStringModel(boolean stringModel)
placeholder
- Placeholder text for empty tag editor.public String getPlaceholder()
public void setPlaceholder(String placeholder)
placeholder
- Placeholder text for empty tag editor.public boolean isShowOnFocus()
getAvailableTags()
: Whether suggestions are shown as soon as the
user focuses on the input field. Defaults to false
.public void setShowOnFocus(boolean showOnFocus)
showOnFocus
- If autocompletion is enabled via getAvailableTags()
: Whether suggestions are shown as
soon as the user focuses on the input field. Defaults to false
.public int getMaxTags()
0
is not limit. Defaults to 0
.public void setMaxTags(int maxTags)
maxTags
- Maximum number of allowed tags.public boolean isForceLowercase()
false
.public void setForceLowercase(boolean forceLowercase)
forceLowercase
- Whether to lowercase all tags.public String getDelimiter()
,;
.public void setDelimiter(String delimiter)
delimiter
- Required string of delimiters - characters for separating tags. The first character is used as
default delimiter in the (hidden) original field.public boolean isRemoveDuplicates()
true
.public void setRemoveDuplicates(boolean removeDuplicates)
removeDuplicates
- Whether to automatically remove duplicate tags.public int getAnimateDelete()
175
.public void setAnimateDelete(int animateDelete)
animateDelete
- Animate duration for deletion of tags in milliseconds. Set to 0 for non-animated removal.public boolean isClickDelete()
false
.public void setClickDelete(boolean clickDelete)
clickDelete
- Whether to delete tags also on right click and on Ctrl+click.public boolean isSortable()
true
, tags are sortable by drag
and drop. Defaults to true
.public void setSortable(boolean sortable)
sortable
- If jQuery UI sortable is available and this option is set to true
, tags are sortable
by drag and drop.public List getAvailableTags()
public void setAvailableTags(List availableTags)
availableTags
- List of available tags. If given and not empty, autocomplete is activated and all tags not
included in this list are disallowed and cannot be entered.protected void validateValue(javax.faces.context.FacesContext context, Object value)
validateValue
in class javax.faces.component.UIInput
Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.