I have a Spring-JSF integrated application. Integration is done with SpringBeanFacesELResolver. My bean class in managed by Spring. Now I am looking to get my query string parameter value inside the bean in 'Spring way'. I am able to get the query string parameter value in 'JSF way' as follows, which I don't want to use as the bean is managed by Spring.
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("myParamName");
Can you please suggest the Spring way to get those?
From my xhtml file I call the method in bean as follows
<h:commandLink action="#{myUserBean.onUserLoad}">
This is the pseudo code of my bean class
@Component
@Scope("session")
public class MyUserBean {
@Autowired
private UserService userService;
public String onUserLoad() {
//get the request parameter value here
}
}