public class GroupValidator extends Object implements ValidationChangedEvent.HasValidationChangedHandlers
HasValidators
interface.Constructor and Description |
---|
GroupValidator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<T extends com.google.gwt.user.client.ui.Widget & HasValidators<?>> |
add(T field)
Adds a field to the group.
|
com.google.web.bindery.event.shared.HandlerRegistration |
addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
Adds a validation changed handler.
|
void |
fireEvent(com.google.gwt.event.shared.GwtEvent<?> event) |
<T extends com.google.gwt.user.client.ui.Widget & HasValidators<?>> |
remove(T field)
Removes a field from the validation group.
|
protected void |
updateStateAndNotify()
Update the state of the validator and notify via
EventBus any changed handlers. |
boolean |
validate()
Validate the group.
|
boolean |
validate(boolean show)
Validate the group.
|
public GroupValidator()
public <T extends com.google.gwt.user.client.ui.Widget & HasValidators<?>> void add(T field)
T
- the generic typefield
- the fieldpublic com.google.web.bindery.event.shared.HandlerRegistration addValidationChangedHandler(ValidationChangedEvent.ValidationChangedHandler handler)
ValidationChangedEvent.HasValidationChangedHandlers
addValidationChangedHandler
in interface ValidationChangedEvent.HasValidationChangedHandlers
handler
- the handlerpublic void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
fireEvent
in interface com.google.gwt.event.shared.HasHandlers
public <T extends com.google.gwt.user.client.ui.Widget & HasValidators<?>> boolean remove(T field)
T
- the generic typefield
- the fieldprotected void updateStateAndNotify()
EventBus
any changed handlers.public 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 © 2018. All rights reserved.