Login widgets. This package is a collection of widgets to help with logins.
To add this to your project add the jar file to your classpath and add the following to your GWT module file:
<inherits name="org.mcarthur.sandy.gwt.login.Login"/>
The login widgets requires a {@link org.mcarthur.sandy.gwt.login.client.LoginPanel.LoginListener} callback to function.
RootPanel rootPanel = RootPanel.get("foo");
LoginPanel.LoginListener loginListener = new LoginPanel.LoginListener() {
public void onSubmit(LoginPanel loginPanel) {
// check username and password
loginPanel.setErrorMessage("Login failed!"); // report an error
loginPanel.reenable(); // allow another attempt
}
};
LoginPanel loginPanel = new LoginPanel(loginListener);
rootPanel.add(loginPanel);