T - the value typepublic class ValueListBox<T> extends ValueListBox<T> implements HasName, HasId, HasResponsiveness, HasPlaceholder, HasSize<InputSize>, HasEditorErrors<T>, HasErrorHandler, HasValidators<T>, HasBlankValidator<T>
HasConstrainedValue based on a
SelectElement.
A Renderer is used to get user-presentable strings to
display in the select element.UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledEditor.Ignore, Editor.PathDEBUG_ID_PREFIXPLACEHOLDER| Constructor and Description |
|---|
ValueListBox(Renderer<T> renderer) |
ValueListBox(Renderer<T> renderer,
ProvidesKey<T> keyProvider) |
| Modifier and Type | Method and Description |
|---|---|
HandlerRegistration |
addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
Adds a validation changed handler.
|
void |
addValidator(Validator<T> validator)
Adds the validator.
|
boolean |
getAllowBlank() |
ErrorHandler |
getErrorHandler()
Gets the error handler.
|
ErrorHandlerType |
getErrorHandlerType()
Gets the error handler type.
|
String |
getId()
Gets the ID of the widget
|
String |
getName() |
String |
getPlaceholder() |
InputSize |
getSize()
Get the size of the widget
|
boolean |
getValidateOnBlur()
Gets the validate on blur.
|
protected void |
initWidget(Widget widget) |
boolean |
removeValidator(Validator<T> validator)
Removes the validator.
|
void |
reset()
Reset the form element to blank and clear error messages.
|
void |
setAllowBlank(boolean allowBlank) |
void |
setErrorHandler(ErrorHandler handler)
Sets the error handler.
|
void |
setErrorHandlerType(ErrorHandlerType type)
Sets the error handler type.
|
void |
setHiddenOn(DeviceSize deviceSize)
Sets the devices that the element is hidden on
|
void |
setId(String id)
Sets the ID on the widget
|
void |
setName(String name) |
void |
setPlaceholder(String placeHolder) |
void |
setSize(InputSize size)
Set the size of the widget
|
void |
setValidateOnBlur(boolean validateOnBlur)
Sets the validate on blur.
|
void |
setValidators(Validator<T>... validators)
The validators used to validate this object.
|
void |
setVisibleOn(DeviceSize deviceSize)
Sets the devices that the element is visible on
|
void |
showErrors(List<EditorError> errors) |
boolean |
validate()
Validate the field's value using the supplied validators.
|
boolean |
validate(boolean show)
Validate the field's value using the supplied validators.
|
addValueChangeHandler, asEditor, getTabIndex, getValue, isEnabled, setAcceptableValues, setAccessKey, setEnabled, setFocus, setTabIndex, setValue, setValueclaimElement, getWidget, initializeClaimedElement, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfireEventpublic ValueListBox(Renderer<T> renderer)
public ValueListBox(Renderer<T> renderer, ProvidesKey<T> keyProvider)
protected void initWidget(Widget widget)
initWidget in class Compositepublic void setVisibleOn(DeviceSize deviceSize)
setVisibleOn in interface HasResponsivenessdeviceSize - device sizeDeviceSizepublic void setHiddenOn(DeviceSize deviceSize)
setHiddenOn in interface HasResponsivenessdeviceSize - device sizesDeviceSizepublic void setPlaceholder(String placeHolder)
setPlaceholder in interface HasPlaceholderpublic String getPlaceholder()
getPlaceholder in interface HasPlaceholderpublic HandlerRegistration addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
addValidationChangedHandler in interface ValidationChangedEvent.HasValidationChangedHandlershandler - the handlerpublic boolean getAllowBlank()
getAllowBlank in interface HasBlankValidator<T>public void setAllowBlank(boolean allowBlank)
setAllowBlank in interface HasBlankValidator<T>allowBlank - the new allow blankpublic void addValidator(Validator<T> validator)
addValidator in interface HasValidators<T>validator - the validatorpublic boolean removeValidator(Validator<T> validator)
removeValidator in interface HasValidators<T>validator - the validatorpublic boolean getValidateOnBlur()
getValidateOnBlur in interface HasValidators<T>public void reset()
reset in interface HasValidators<T>public void setValidateOnBlur(boolean validateOnBlur)
setValidateOnBlur in interface HasValidators<T>validateOnBlur - the new validate on blurpublic void setValidators(Validator<T>... validators)
setValidators in interface HasValidators<T>validators - the new validatorspublic boolean validate()
validate in interface HasValidators<T>public boolean validate(boolean show)
validate in interface HasValidators<T>show - the error to the user.public ErrorHandler getErrorHandler()
getErrorHandler in interface HasErrorHandlerpublic void setErrorHandler(ErrorHandler handler)
setErrorHandler in interface HasErrorHandlerhandler - the new error handlerpublic ErrorHandlerType getErrorHandlerType()
getErrorHandlerType in interface HasErrorHandlerpublic void setErrorHandlerType(ErrorHandlerType type)
setErrorHandlerType in interface HasErrorHandlertype - the new error handler typepublic void showErrors(List<EditorError> errors)
showErrors in interface HasEditorErrors<T>Copyright © 2017. All rights reserved.