0

I am new to JSF and primefaces. So please excuse me for bad understanding.

I have few parameters, which are retrieved on index.xhtml(starting page). How can I set these parameters into the session or in RequestParameterMap to retriever again in every other page and bean or from some other way.

FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();

I retrieve value from it. But I want these values to be set in session or in this map, or what would be the best way ? Because those are geolocation parameters, which I do not see in any other page except on starting index.xthml page.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
apts
  • 19
  • 5
  • Just use a session scoped bean to hold those values. – BalusC Apr 11 '16 at 13:44
  • I did use SessionScoped bean. Initially, I am supplying hardcoded geopositions but later retrieving original geolocation from user request. I solved this issue by using FacesContext.getCurrentInstance().getExternalContext().getSessionMap Here its possible to set parameters into SessionMap, which can be retrieved in the application elsewhere. – apts Apr 12 '16 at 08:50
  • Session scoped beans behave the same and are more self-documenting. No need to manually fiddle with scoped maps from ExternalContext. – BalusC Apr 12 '16 at 09:14
  • Hi BalusC, thanks for your explaination but still quite abstract. Is there an alternative of above ? could you kindly be more elaborate if you explain – apts Apr 12 '16 at 14:38

0 Answers0