Hi Experts,
I have two pages, Page A and Page B, and I would like to pass an URL parameter of the form ?key=value when navigating from the one page to the next. In this way I would get access to the value on Page B without having to use a session-scoped JSF bean. I'd like to do something similar to Apache Trinidad's PageFlowScope where a collection of Maps is stored in a session-scoped bean and the request-scoped beans know which one to access based on the ID passed through the URL to them.
I tried the following code, but my Map Entry is dropped in between requests (i.o.w the Map does not contain my Entry after a request):
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("key", "value");
-and-
((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest()).setAttribute("test", "value");
I don't understand what I'm doing wrong, why I'm unable to retrieve my attribute.
Any and all help will be appreciated.
Thank you,
Ristretto