KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I believe there are 2 ways to get the parameters from the URL in JSF. One being in the bean: Map<String, String> params =FacesContext.getCurrentInstance(). getExternalContext().getRequestParameterMap(); String parameterOne = params.get("parameterOne"); and the other one being in the facelets page <f:metadata> <f:viewParam name="parameterOne" value="#{bean.parameterOne}"/> </f:metadata> Obviously the latter one will require a field in the class and getter / setter for it. Besides that, what are the differences between these 2 different approaches? Which one should be preferred?
Tags (comma-separated)
Save Edits
Cancel