« Return to Thread: Can I get a 'Nice URL' when form validation fails?

Can I get a 'Nice URL' when form validation fails?

by Philip Wilkinson :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View in Thread

Hi,

When my form validation fails, the page is redisplayed with the default url with all its wicket:interface stuff.
I'd rather this didn't happen as I've bookmarked the page, and would prefer to have the bookmarked url redisplayed. (the bookmarked url was initially displayed for the page)

I've tried overriding Form.onError() { setResponsePage(WelcomePage.class, new PageParameters()); }
and that got me my nice bookmarked url, but lost all my form field values. Obviously creating a new page instance.

I've also tried Form.onError() { setResponsePage(WelcomePage.this); }
but this didn't help. I just got the default url.

Is it possible with wicket to only have the bookmarkable urls visible, without exposing the wicket internals in the url?

Thanks in advance
Philip Wilkinson.

 « Return to Thread: Can I get a 'Nice URL' when form validation fails?