Get request parameter values in JSF

Viewed 66254

I have a <odc:tabbedPanel/> component. Inside this I have a page in the <odc:bfPanel/> component. I want to access a value (of a inputtext or radiobutton) from the page in the <odc:bfPanel/> in my <odc:tabbedPanel/> managed bean class. Please guide me as to how do I go about this. Please note here that I do not want to use the session here. I want it in request only. I have tried the below options but they didn't work for me.

option one

String value = (String) ctx.getExternalContext()
                        .getRequestParameterValuesMap()
                        .get("managedbean.property");

option two

String value = (String) ctx.getExternalContext()
                         .getRequestParameterValuesMap()
                         .get("property");

option three

HttpServletRequest req = (HttpServletRequest) FacesContext.getCurrentInstance()
                         .getExternalContext().getRequest();
System.out.println(req.getParameter("property"));

option four

Map requestMap = FacesContext.getCurrentInstance() 
                         .getExternalContext().getRequestHeaderValuesMap(); 
String msgId = (String) requestMap.get("property"); 
System.out.println(msgId);

option five

HttpServletRequestWrapper r = new HttpServletRequestWrapper(req);
String value1 = r.getParameter("managedbean.property");

i want the value not in the jsp's managed bean ... but i want it in some another managed bean. here i have pages inside a page(as i had mentioned its a tabbed panel). now i want the value in the managed bean of the outer tab –

3 Answers
Related