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.DebugIdImplEnabled

    Nested classes/interfaces inherited from interface org.gwtproject.editor.client.Editor

    org.gwtproject.editor.client.Editor.Ignore, org.gwtproject.editor.client.Editor.Path
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final List<IdAndNameBean<T>>
     

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    constructor.
    constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gwt.event.shared.HandlerRegistration
    addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<T> handler)
     
     
    boolean
    Returns false if the element is a candidate for constraint validation, and it does not satisfy its constraints.
    protected void
     
    final void
    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.HTMLPanel
    get validation message element.
    elemental2.dom.ValidityState
    The validity states that this element is in.
     
    boolean
    get autofocus value.
    boolean
    Reflects the required HTML attribute, indicating that the user must fill in a value before submitting a form.
    protected void
     
    void
    set autocomplete attribute value.
    void
    setAutofocus(boolean arg)
    set autofocus value.
    void
    set custom validity value.
    void
    set place holder text.
    void
    setRequired(boolean arg)
    Reflects the required HTML attribute, indicating that the user must fill in a value before submitting a form.
    void
    setValidationMessageElement(com.google.gwt.user.client.ui.HTMLPanel element)
    set validation message element.
    void
    setValue(T value)
     
    void
    setValue(T value, boolean fireEvents)
     
    void
    showErrors(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, setWidget

    Methods 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, unsinkEvents

    Methods 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, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.gwt.event.shared.HasHandlers

    fireEvent

    Methods inherited from interface de.knightsoftnet.mtwidgets.client.ui.widget.features.HasValidationMessageElement

    editorErrorMatches, setTitle, showErrors
  • Field Details

  • Constructor Details

    • IdAndNameSearchableListBox

      public IdAndNameSearchableListBox()
      constructor.
    • IdAndNameSearchableListBox

      public IdAndNameSearchableListBox(Collection<? extends IdAndNameBean<T>> entries)
      constructor.
      Parameters:
      entries - collection of id and name bean entries
  • Method Details

    • fillEntryCollections

      public final void fillEntryCollections(Collection<? extends IdAndNameBean<T>> entries)
      fill entries of the listbox.
      Parameters:
      entries - list of entries
    • onEnsureDebugId

      protected void onEnsureDebugId(String baseId)
      Overrides:
      onEnsureDebugId in class com.google.gwt.user.client.ui.UIObject
    • addValueChangeHandler

      public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<T> handler)
      Specified by:
      addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>
    • ensureDomEventHandlers

      protected void ensureDomEventHandlers()
    • getValue

      public T getValue()
      Specified by:
      getValue in interface com.google.gwt.user.client.ui.HasValue<T>
      Specified by:
      getValue in interface com.google.gwt.user.client.TakesValue<T>
      Specified by:
      getValue in interface org.gwtproject.editor.client.TakesValue<T>
    • setValue

      public void setValue(T value)
      Specified by:
      setValue in interface com.google.gwt.user.client.ui.HasValue<T>
      Specified by:
      setValue in interface com.google.gwt.user.client.TakesValue<T>
      Specified by:
      setValue in interface org.gwtproject.editor.client.TakesValue<T>
    • setValue

      public void setValue(T value, boolean fireEvents)
      Specified by:
      setValue in interface com.google.gwt.user.client.ui.HasValue<T>
    • showErrors

      public void showErrors(List<org.gwtproject.editor.client.EditorError> errors)
      Specified by:
      showErrors in interface org.gwtproject.editor.client.HasEditorErrors<T>
      Specified by:
      showErrors in interface HasValidationMessageElement<T,ValueBoxEditor<T>>
    • asEditor

      public ValueBoxEditor<T> asEditor()
      Specified by:
      asEditor in interface org.gwtproject.editor.client.IsEditor<T>
    • isAutofocus

      public boolean isAutofocus()
      Description copied from interface: HasAutofocus
      get autofocus value.
      Specified by:
      isAutofocus in interface HasAutofocus
      Returns:
      true if input field has autofocus
    • setAutofocus

      public void setAutofocus(boolean arg)
      Description copied from interface: HasAutofocus
      set autofocus value.
      Specified by:
      setAutofocus in interface HasAutofocus
      Parameters:
      arg - true if input field has autofocus
    • setValidationMessageElement

      public void setValidationMessageElement(com.google.gwt.user.client.ui.HTMLPanel element)
      Description copied from interface: HasValidationMessageElement
      set validation message element.
      Specified by:
      setValidationMessageElement in interface HasValidationMessageElement<T,ValueBoxEditor<T>>
      Parameters:
      element - element to set
    • getValidationMessageElement

      public com.google.gwt.user.client.ui.HTMLPanel getValidationMessageElement()
      Description copied from interface: HasValidationMessageElement
      get validation message element.
      Specified by:
      getValidationMessageElement in interface HasValidationMessageElement<T,ValueBoxEditor<T>>
      Returns:
      element or null if non is set
    • getAutocomplete

      public String getAutocomplete()
      Description copied from interface: HasAutocomplete
      get autocomplete attribute value.
      Specified by:
      getAutocomplete in interface HasAutocomplete
      Returns:
      input field autocomplete attribute value
    • setAutocomplete

      public void setAutocomplete(String arg)
      Description copied from interface: HasAutocomplete
      set autocomplete attribute value.
      Specified by:
      setAutocomplete in interface HasAutocomplete
      Parameters:
      arg - input field autocomplete attribute value to set
    • getPlaceholder

      public String getPlaceholder()
      Description copied from interface: HasPlaceholder
      get place holder text.
      Specified by:
      getPlaceholder in interface HasPlaceholder
      Returns:
      place holder text displayed when value is empty
    • setPlaceholder

      public void setPlaceholder(String arg)
      Description copied from interface: HasPlaceholder
      set place holder text.
      Specified by:
      setPlaceholder in interface HasPlaceholder
      Parameters:
      arg - place holder text displayed when value is empty
    • getValidationMessage

      public String getValidationMessage()
      Description copied from interface: HasValidity
      A 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:
      getValidationMessage in interface HasValidity
      Returns:
      localized validation message
    • getValidity

      public elemental2.dom.ValidityState getValidity()
      Description copied from interface: HasValidity
      The validity states that this element is in.
      Specified by:
      getValidity in interface HasValidity
      Returns:
      ValidityState
    • checkValidity

      public boolean checkValidity()
      Description copied from interface: HasValidity
      Returns false if the element is a candidate for constraint validation, and it does not satisfy its constraints. In this case, it also fires an invalid event at the element. It returns true if the element is not a candidate for constraint validation, or if it satisfies its constraints.
      Specified by:
      checkValidity in interface HasValidity
      Returns:
      true if input is valid
    • isRequired

      public boolean isRequired()
      Description copied from interface: HasRequired
      Reflects the required HTML attribute, indicating that the user must fill in a value before submitting a form.
      Specified by:
      isRequired in interface HasRequired
      Returns:
      required true/false
    • setRequired

      public void setRequired(boolean arg)
      Description copied from interface: HasRequired
      Reflects the required HTML attribute, indicating that the user must fill in a value before submitting a form.
      Specified by:
      setRequired in interface HasRequired
      Parameters:
      arg - required true/false
    • setCustomValidity

      public void setCustomValidity(String message)
      Description copied from interface: HasValidationMessageElement
      set custom validity value.
      Specified by:
      setCustomValidity in interface HasValidationMessageElement<T,ValueBoxEditor<T>>
      Parameters:
      message - message to show