flexTable.setWidget(1, 0, lblPassword);
TextBox passwordTextBox = new TextBox();
flexTable.setWidget(1, 1, passwordTextBox);
PushButton pshbtnAsCustomer = new PushButton("As Customer");
pshbtnAsCustomer.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
customerSO.getCustomer(loginIDtextBox.getText(), new AsyncCallback<Customer>() {
public void onSuccess(Customer result) {
Window.alert("Logged in as Customer " + result.getCustomerName());
}
public void onFailure(Throwable caught) {
Window.alert("A problem " + caught.getMessage());
}
});
}
});
flexTable.setWidget(2, 0, pshbtnAsCustomer);
PushButton pshbtnAsTrader = new PushButton("As Trader");
pshbtnAsTrader.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert("Login as Trader is not implemented yet");
}
});
flexTable.setWidget(2, 1, pshbtnAsTrader);