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

Reply via email to