akbertram/activityinfo — comment on commit 86862cfcdfb00d29894c494ef22879dbdabe401e
File: sigmah/src/main/java/org/activityinfo/login/client/LoginEntryPoint.java line 27
By mabidshafiq:

There is even a simpler solution without using JSNI at all. Set the
form's action to just "javascript:;" and put the login logic to the
form's submitHandler:

FormPanel form =
FormPanel.wrap(Document.get().getElementById("login"), false);
form.setAction("javascript:;");

form.addFormPanel(new FormPanel() {
public void onSubmit(FormSubmitEvent event) {
// do some validation before submitting (non-empty fields)
// and call event.setCancelled(true) if needed.

// get the fields values and do your GWT-RPC call or
// RequestBuilder thing here.
}
public void onSubmitComplete(FormSubmitCompleteEvent event) {
// will never be called.
}
});

Tested in IE8, firefox 3.5 and chrome 4.1 and chrome 5 beta, works in
the first two, the last two don't offer to save the password.