Class IdAndNameSearchableListBox<T>
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
de.knightsoftnet.mtwidgets.client.ui.widget.IdAndNameSearchableListBox<T>
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.TakesValue<T>,com.google.gwt.user.client.ui.HasValue<T>,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.IsRenderable,com.google.gwt.user.client.ui.IsWidget,HasAutocomplete,HasAutofocus,HasPlaceholder,HasRequired,HasValidationMessageElement<T,,ValueBoxEditor<T>> HasValidity,org.gwtproject.editor.client.Editor<T>,org.gwtproject.editor.client.HasEditorErrors<T>,org.gwtproject.editor.client.IsEditor<ValueBoxEditor<T>>,org.gwtproject.editor.client.TakesValue<T>
- Direct Known Subclasses:
SortableIdAndNameSearchableListBox
public class IdAndNameSearchableListBox<T>
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.user.client.ui.HasValue<T>, org.gwtproject.editor.client.TakesValue<T>, HasValidationMessageElement<T,ValueBoxEditor<T>>, HasAutofocus, HasRequired, HasValidity, HasPlaceholder, HasAutocomplete
a searchable list box with id and name, based on input text box and HTML5 data list.
- Author:
- Manfred Tremmel
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledNested classes/interfaces inherited from interface org.gwtproject.editor.client.Editor
org.gwtproject.editor.client.Editor.Ignore, org.gwtproject.editor.client.Editor.Path -
Field Summary
FieldsFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionconstructor.IdAndNameSearchableListBox(Collection<? extends IdAndNameBean<T>> entries) constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.event.shared.HandlerRegistrationaddValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<T> handler) asEditor()booleanReturns false if the element is a candidate for constraint validation, and it does not satisfy its constraints.protected voidfinal voidfillEntryCollections(Collection<? extends IdAndNameBean<T>> entries) fill entries of the listbox.get autocomplete attribute value.get place holder text.A localized message that describes the validation constraints that the control does not satisfy (if any).com.google.gwt.user.client.ui.HTMLPanelget validation message element.elemental2.dom.ValidityStateThe validity states that this element is in.getValue()booleanget autofocus value.booleanReflects therequiredHTML attribute, indicating that the user must fill in a value before submitting a form.protected voidonEnsureDebugId(String baseId) voidsetAutocomplete(String arg) set autocomplete attribute value.voidsetAutofocus(boolean arg) set autofocus value.voidsetCustomValidity(String message) set custom validity value.voidsetPlaceholder(String arg) set place holder text.voidsetRequired(boolean arg) Reflects therequiredHTML attribute, indicating that the user must fill in a value before submitting a form.voidsetValidationMessageElement(com.google.gwt.user.client.ui.HTMLPanel element) set validation message element.voidvoidvoidshowErrors(List<org.gwtproject.editor.client.EditorError> errors) Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEventMethods inherited from interface de.knightsoftnet.mtwidgets.client.ui.widget.features.HasValidationMessageElement
editorErrorMatches, setTitle, showErrors
-
Field Details
-
entries
-
-
Constructor Details
-
IdAndNameSearchableListBox
public IdAndNameSearchableListBox()constructor. -
IdAndNameSearchableListBox
constructor.- Parameters:
entries- collection of id and name bean entries
-
-
Method Details
-
fillEntryCollections
fill entries of the listbox.- Parameters:
entries- list of entries
-
onEnsureDebugId
- Overrides:
onEnsureDebugIdin classcom.google.gwt.user.client.ui.UIObject
-
ensureDomEventHandlers
protected void ensureDomEventHandlers() -
getValue
-
setValue
-
setValue
- Specified by:
setValuein interfacecom.google.gwt.user.client.ui.HasValue<T>
-
showErrors
- Specified by:
showErrorsin interfaceorg.gwtproject.editor.client.HasEditorErrors<T>- Specified by:
showErrorsin interfaceHasValidationMessageElement<T,ValueBoxEditor<T>>
-
asEditor
- Specified by:
asEditorin interfaceorg.gwtproject.editor.client.IsEditor<T>
-
isAutofocus
public boolean isAutofocus()Description copied from interface:HasAutofocusget autofocus value.- Specified by:
isAutofocusin interfaceHasAutofocus- Returns:
- true if input field has autofocus
-
setAutofocus
public void setAutofocus(boolean arg) Description copied from interface:HasAutofocusset autofocus value.- Specified by:
setAutofocusin interfaceHasAutofocus- Parameters:
arg- true if input field has autofocus
-
setValidationMessageElement
public void setValidationMessageElement(com.google.gwt.user.client.ui.HTMLPanel element) Description copied from interface:HasValidationMessageElementset validation message element.- Specified by:
setValidationMessageElementin interfaceHasValidationMessageElement<T,ValueBoxEditor<T>> - Parameters:
element- element to set
-
getValidationMessageElement
public com.google.gwt.user.client.ui.HTMLPanel getValidationMessageElement()Description copied from interface:HasValidationMessageElementget validation message element.- Specified by:
getValidationMessageElementin interfaceHasValidationMessageElement<T,ValueBoxEditor<T>> - Returns:
- element or null if non is set
-
getAutocomplete
Description copied from interface:HasAutocompleteget autocomplete attribute value.- Specified by:
getAutocompletein interfaceHasAutocomplete- Returns:
- input field autocomplete attribute value
-
setAutocomplete
Description copied from interface:HasAutocompleteset autocomplete attribute value.- Specified by:
setAutocompletein interfaceHasAutocomplete- Parameters:
arg- input field autocomplete attribute value to set
-
getPlaceholder
Description copied from interface:HasPlaceholderget place holder text.- Specified by:
getPlaceholderin interfaceHasPlaceholder- Returns:
- place holder text displayed when value is empty
-
setPlaceholder
Description copied from interface:HasPlaceholderset place holder text.- Specified by:
setPlaceholderin interfaceHasPlaceholder- Parameters:
arg- place holder text displayed when value is empty
-
getValidationMessage
Description copied from interface:HasValidityA localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints.- Specified by:
getValidationMessagein interfaceHasValidity- Returns:
- localized validation message
-
getValidity
public elemental2.dom.ValidityState getValidity()Description copied from interface:HasValidityThe validity states that this element is in.- Specified by:
getValidityin interfaceHasValidity- Returns:
- ValidityState
-
checkValidity
public boolean checkValidity()Description copied from interface:HasValidityReturns false if the element is a candidate for constraint validation, and it does not satisfy its constraints. In this case, it also fires aninvalidevent at the element. It returns true if the element is not a candidate for constraint validation, or if it satisfies its constraints.- Specified by:
checkValidityin interfaceHasValidity- Returns:
- true if input is valid
-
isRequired
public boolean isRequired()Description copied from interface:HasRequiredReflects therequiredHTML attribute, indicating that the user must fill in a value before submitting a form.- Specified by:
isRequiredin interfaceHasRequired- Returns:
- required true/false
-
setRequired
public void setRequired(boolean arg) Description copied from interface:HasRequiredReflects therequiredHTML attribute, indicating that the user must fill in a value before submitting a form.- Specified by:
setRequiredin interfaceHasRequired- Parameters:
arg- required true/false
-
setCustomValidity
Description copied from interface:HasValidationMessageElementset custom validity value.- Specified by:
setCustomValidityin interfaceHasValidationMessageElement<T,ValueBoxEditor<T>> - Parameters:
message- message to show
-