Class SuggestTextBox
java.lang.Object
com.ptc.core.components.rendering.AbstractGuiComponent
com.ptc.core.components.rendering.guicomponents.HTMLGuiComponent
com.ptc.core.components.rendering.guicomponents.TextBox
com.ptc.core.components.rendering.guicomponents.SuggestTextBox
- All Implemented Interfaces:
GuiComponent,com.ptc.netmarkets.util.misc.NmFormatable,Serializable
A simple GUI component that represents a suggestable textbox.
This text box generate suggestions as you type along which can be selected for the text input
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ptc.core.components.rendering.guicomponents.TextBox
TextBox.InputType -
Field Summary
Fields inherited from class com.ptc.core.components.rendering.AbstractGuiComponent
componentHidden, divClass, enabled, locale, multiValued, readOnly, renderer, renderWhileHidden, required, valueHiddenFields inherited from interface com.ptc.core.components.rendering.GuiComponent
NBSPFields inherited from interface com.ptc.netmarkets.util.misc.NmFormatable
DIV_CLASS, RENDER_WHILE_HIDDEN, STYLE_CLASSES -
Constructor Summary
ConstructorsConstructorDescriptionSuggestTextBox(String id, String service_key) Returns a newSuggestTextBoxinitialized to the values specified in the parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidBinds a given value to the specified key.Returns the value associated with the key, if one exists.voidsetMaxResults(int max) Sets the maxResults of this element.voidsetMinChars(int min) Sets the minChars of this element.Methods inherited from class com.ptc.core.components.rendering.guicomponents.TextBox
getId, getInputType, getInternalValue, getMaxByteLength, getMaxLength, getPlaceHolder, getStyle, getValue, getWidth, isBrowserAutoCompleteEnabled, isEditable, isHidden, setBrowserAutoCompleteEnabled, setEnabled, setHidden, setId, setInputType, setMaxByteLength, setMaxLength, setName, setPlaceHolder, setRequired, setStyle, setTooltip, setValue, setWidthMethods inherited from class com.ptc.core.components.rendering.guicomponents.HTMLGuiComponent
addJsAction, addJsActions, appendJsAction, getComponentType, getIdForTrail, getIdForTrail, getJsAction, getJsActions, getNameQualifier, getTabIndex, getTooltip, hasJsAction, setComponentType, setEditable, setNameQualifier, setTabIndexMethods inherited from class com.ptc.core.components.rendering.AbstractGuiComponent
_isValueNull, addHiddenField, addOnChangeListenerForDriverAttribute, addStyleClass, draw, getCollationKey, getColumnName, getDivClass, getFilterInternalValue, getHiddenClass, getHiddenFields, getInternalValueString, getLabel, getLocale, getName, getRenderer, getRequiredStyle, getStyleClasses, getStyleClassList, isComponentHidden, isDriverAttribute, isEnabled, isHiddenId, isMultiValued, isReadOnly, isRenderLabel, isRenderLabelOnRight, isRenderWhileHidden, isRequired, isValueHidden, isValueNull, removeStyleClass, setCollationKey, setColumnName, setComponentHidden, setDivClass, setFilterInternalValue, setHiddenId, setHiddenIdClass, setLabel, setLocale, setMultiValued, setReadOnly, setRenderer, setRenderLabel, setRenderLabelOnRight, setRenderWhileHidden, setValueHidden, toString
-
Constructor Details
-
SuggestTextBox
Returns a newSuggestTextBoxinitialized to the values specified in the parameters. The first argument is the id of the element, the second is the key that is used to lookup the service to fire for this particularSuggestTextBox. The id and service_key *must* be non-null, non-blank Strings. Attempting to create this object with invalid data will result in anIllegalArgumentException.
Supported API: true- Parameters:
id- the element id (must be non-null, non-blank)service_key- the key the service class is bound to (must be non-null, non-blank)
-
-
Method Details
-
setMinChars
public void setMinChars(int min) Sets the minChars of this element. Defaults to 3. This tells the suggest widget how many characters must be entered before it calls the server.
Supported API: true- Parameters:
min- an int representing the minChars of this element
-
setMaxResults
public void setMaxResults(int max) Sets the maxResults of this element. This value is passed to the query class to determine the maximum number of results that should be returned. Defaults to 15.
Supported API: true- Parameters:
max- the max number of results to return
-
addParm
Binds a given value to the specified key. If the key is null or an empty string, an IllegalArgumentException is thrown.
Supported API: true- Parameters:
key- - key with which the specified value is to be associatedvalue- - value to be associated with the specified key
-
getParm
Returns the value associated with the key, if one exists. May return null.
Supported API: true- Parameters:
key- - the key whose associated value is to be returned- Returns:
- value - the value associated with the key
-