if (Index.userLoggedIn()) {
buttonText = Index.getStrings().secData();
} else {
buttonText = Index.getStrings().getSecData();
}
final SimpleButton authTestButton = new SimpleButton(buttonText);
if (Index.isAppEngine()) {
authTestButton.setText(Index.getStrings().installMessage());
authTestButton.setEnabled(false);
}
authTestButton.getElement().setId("authTestBtn");
this.add(authTestButton, "testAuth");
authTestButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event)
{
authTestButton.setInProgress(true);
//a little timer to simulate time it takes to set in progress back to false
Timer t = new Timer() {
@Override
public void run()
{
authTestButton.setInProgress(false);
getData();
}
};
t.schedule(1000);