Question

I use play framework 2 and I want de store search form in cookies, because I want to retrieve the search parameters when changing page. I am inspired by the example (Play sample application — Computer database). although the example is only one search parameter if you have a recommendation, I'd appreciate it :)

Was it helpful?

Solution

Note: your question doesn't meet StackOverflow rules...

Although you didn't show us any example of your approach I just guess that using built-in cache would be better solution for you as i.e. it doesn't have 4kb limitation (as cookies has).

Just after initial search form receiving (and probably after some validation) store it in cache using some unique key, next pass this key through cookie OR via form param. On next page you can use this stored key to find cached object, update with additional params and save again, and so on...

It's just a free suggestion as we don't know what exactly have you coded now ;>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top