Wednesday, November 23, 2011

Pass data from page to page on the "requestScope"

My approach to development can best be described as "results-driven".  I like theoretical techniques, I like knowing why things work the way they work and I always like to hear about other (and perhaps better) ways to accomplish what I have done but absolutely first and foremost for me when I am developing is "getting it done" and "making it always work".  Consequently my code is often pretty brute force.

Case in point...the documentation says I should be able to pass a requestScope value between pages but, alas, no.

I want the benefits of shorter lifespan scopes so whenever I want to pass something from one page to another in the "requestScope", I put it in the sessionScope first, move to the next page, read the sessionScope value in the next page, place it into a viewScope value then set the sessionScope value to null.

I don't like it but it works for now until passing values on the requestScope actually works.