public class GroupValidator extends Object implements ValidationChangedEvent.HasValidationChangedHandlers
HasValidators
interface.Constructor and Description |
---|
GroupValidator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<T extends Widget & HasValidators<?>> |
add(T field)
Adds a field to the group.
|
HandlerRegistration |
addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
Adds a validation changed handler.
|
void |
fireEvent(GwtEvent<?> event) |
<T extends Widget & HasValidators<?>> |
remove(T field)
Removes a field from the validation group.
|
boolean |
validate()
Validate the group.
|
boolean |
validate(boolean show)
Validate the group.
|
public GroupValidator()
public <T extends Widget & HasValidators<?>> void add(T field)
T
- the generic typefield
- the fieldpublic HandlerRegistration addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
addValidationChangedHandler
in interface ValidationChangedEvent.HasValidationChangedHandlers
handler
- the handlerpublic void fireEvent(GwtEvent<?> event)
fireEvent
in interface HasHandlers
public <T extends Widget & HasValidators<?>> boolean remove(T field)
T
- the generic typefield
- the fieldpublic boolean validate()
#validate(Editor, Object)
on each field in the group.public boolean validate(boolean show)
#validate(Editor, Object)
on each field in the group.show
- do we want to show the user the result of the validate via ui marks?Copyright © 2017. All rights reserved.