public abstract class ClickCallback<T> extends Object implements AsyncCallback<T>
super.onSuccess() and super.onFailure() if you
override those methods so that they can automatically reenable the trigger button.
When using the ClickCallback on a Label, the callback automatically adds the style
actionLabel to the label and removes the style when the label is disabled during
the service call. This style should at a minimum add 'text-decoration: underline; cursor: hand'
to the label to indicate to the user that it is clickable.
| Constructor and Description |
|---|
ClickCallback(HasClickHandlers trigger,
TextBox... onEnters)
Creates a callback for the supplied trigger (the constructor will automatically add this
callback to the trigger as a click listener).
|
| Modifier and Type | Method and Description |
|---|---|
void |
onFailure(Throwable cause) |
void |
onSuccess(T result) |
ClickCallback<T> |
setConfirmChoices(String confirm,
String abort)
Configures the choices to be shown in the confirmation dialog.
|
ClickCallback<T> |
setConfirmHTML(String message)
Configures this callback with an HTML confirmation message.
|
ClickCallback<T> |
setConfirmText(String message)
Configures this callback with a plain text confirmation message.
|
public ClickCallback(HasClickHandlers trigger, TextBox... onEnters)
public void onSuccess(T result)
onSuccess in interface AsyncCallback<T>public void onFailure(Throwable cause)
onFailure in interface AsyncCallback<T>public ClickCallback<T> setConfirmText(String message)
public ClickCallback<T> setConfirmHTML(String message)
public ClickCallback<T> setConfirmChoices(String confirm, String abort)
Copyright © 2013. All Rights Reserved.