Hi everyone,
When I use a code fragment common in JSF-web applications, all I ever get is "null" which makes me think that the context is not available in exo. Is that correct?
<---snip--->
String param = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("itemID");
int itemID = new Integer(param).intValue();
<---snap--->
I use that to pass a simple parameter from one backing bean to another.
In my application, each JSF page has its own backing bean.
Like page1.jsp has a
Page1BackingBean.java, page2.jsp has a Page2BackingBean.java and so forth.
Page1 contains a list of items.
When a user clicks on an item, Page2 should use the itemID, carry out a database lookup to fetch details on that itemID and display it.
That's what I try to do with the above code sniplet. But it always returns "null". What do I do wrong?
Thanks
r.