|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gwtbootstrap3.client.ui.base.mixin.DefaultValidatorMixin<W,V>
W - the generic typeV - the value typepublic class DefaultValidatorMixin<W extends Widget & HasValue<V> & Editor<V>,V>
Abstract validator mixin. Contains all of the validation logic.
| Field Summary | |
|---|---|
protected ErrorHandler |
errorHandler
|
protected Set<ValidatorWrapper<V>> |
validators
|
| Constructor Summary | |
|---|---|
DefaultValidatorMixin(W inputWidget,
ErrorHandler errorHandler)
Instantiates a new abstract validator mixin. |
|
| Method Summary | |
|---|---|
void |
addValidator(Validator<V> validator)
Adds the validator. |
boolean |
getValidateOnBlur()
Gets the validate on blur. |
void |
reset()
Reset the form element to blank and clear error messages. |
void |
setErrorHandler(ErrorHandler errorHandler)
Sets the error handler. |
void |
setValidateOnBlur(boolean vob)
Sets the validate on blur. |
void |
setValidators(Validator<V>... newValidators)
The validators used to validate this object. |
boolean |
validate()
Validate the field's value using the supplied validators. |
boolean |
validate(boolean show)
Validate the field's value using the supplied validators. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ErrorHandler errorHandler
protected Set<ValidatorWrapper<V>> validators
| Constructor Detail |
|---|
public DefaultValidatorMixin(W inputWidget,
ErrorHandler errorHandler)
inputWidget - the input widgeterrorHandler - the error handler| Method Detail |
|---|
public void addValidator(Validator<V> validator)
addValidator in interface HasValidators<V>validator - the validatorpublic boolean getValidateOnBlur()
getValidateOnBlur in interface HasValidators<V>public void setErrorHandler(ErrorHandler errorHandler)
errorHandler - the new error handlerpublic void setValidateOnBlur(boolean vob)
setValidateOnBlur in interface HasValidators<V>vob - the new validate on blurpublic void setValidators(Validator<V>... newValidators)
setValidators in interface HasValidators<V>newValidators - the new validatorspublic boolean validate()
validate in interface HasValidators<V>public boolean validate(boolean show)
validate in interface HasValidators<V>show - the error to the user.
public void reset()
reset in interface HasValidators<V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||