add the message to the session and
setResponsePage(ForgotPassword.class); You may need to do
setRedirect(true);
--
Jeremy Thomerson
http://www.wickettraining.com
On Thu, May 21, 2009 at 2:04 PM, Kent Larsson kent.lars...@gmail.com wrote:
Hi,
I have a simple page, with a form where the user may fill in their
e-mail and press the submit button.
I mount it in the init method of the class which implements
WebApplication using:
mountBookmarkablePage(forgotpassword, ForgotPassword.class);
It works and I'm able to access the page by visiting:
http://localhost:8080/app/forgotpassword
When the user fills in their email and presses submit the URL changes
into: http://localhost:8080/app/?wicket:interface=:6
My page code is: (or for a syntax highlighted version visit:
http://pastebin.com/f70c8ac47 )
public class ForgotPassword extends BasePage {
TextField email;
�...@springbean
ForgotPasswordRequestService forgotPasswordRequestService;
public ForgotPassword(final PageParameters parameters) {
super(parameters);
Form form = new Form(form) {
private static final long serialVersionUID = 1L;
�...@override
protected void onSubmit() {
System.out.println(###
+email.getModelObject());
email.setModelObject();
}
};
email = new TextField(email, new Model());
form.add(email);
Button submit = new Button(submit);
form.add(submit);
add(form);
}
}
Ideally I would like the URL to be
http://localhost:8080/app/forgotpassword after the e-mail submission.
I still would like to have a message on the page after submit, stating
the the password request has been mailed to the user.
If I can't have my ideal this would be better than the current:
http://localhost:8080/app/forgotpassword/something . Where something
is ignored in the case some user bookmarks the page and visits it
without any active session.
Best regards, Kent
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org