I have a web application with a complicated form that:
- performs field validation,
- converts the value to an input format(array) that is easy to parse for the next page.
- redirects the user to the next page (data is passed in the URL)
- The next page then loads the data performs the calculations and displays the results.
This is all done statelessly in Wicket. I was thinking about how I had done this. It doesn't feel "right". The conversion to an array and redirect "work" but there has to be a better way.
UPDATE
Why the form is Stateless:
The web application in question shares the server with 2 other web applications. I was running into OutOfMemoryException
s after deploying a new version of this application. When I would check the Tomcat Manager Application BEFORE I converted the forms to being stateless I would routinely see ~150 or "active sessions". Now that the forms/result pages are stateless I see 5 "active sessions". Which has cut down quite a bit on my memory usage.(I think). I still have a nagging doubt though: https://stackoverflow.com/questions/16049219/how-to-handle-a-hibernate-bi-directional-mapping-for-a-set-properly
Suggestion:
I've started wondering if maybe I should remove the "results" page mount point and convert it into a panel. That way I can just pass my complicated object directly to it and swap panels in a full page refresh. Is that even possible in a stateless page?
POST
Also I don't believe wicket natively supports POST redirect: How to use post method in wicket