I have this url for example:
When the user click in this link, then I should be able to get the parameter value which is ‘content’.
I was reading BalusC tutorial but is JSF 1.2 and I’m learning with JSF 2.
How could I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Two ways (both examples assume that the parameter name is
parameteras in your question):Use
@ManagedPropertyon the desired bean property:This works on request scoped beans only and does not allow for fine grained conversion and validation.
Use
<f:viewParam>in the view pointing to the desired bean property:This works on view scoped beans as well and allows for fine grained conversion and validation using the standard validators like as on normal input components. It even allows for attaching a
<h:message>.See also: