How to get URL value

0

Help me ...

I'm stuck on the following question ...

I need to get the user id that comes through the URL parameter, as below:

localhost: 8080 / sgc / pages / generateSenha.xhtml? id = 3

But I do not know how to get this value "id = 3".

A link is sent to the email of the user who forgot the password, so when the user clicks on the link this value no longer exists in the ManagedBean, where I am locked. How do I get this value?

Help me, please.

    
asked by anonymous 15.03.2016 / 15:23

1 answer

0

You need to use a face called ViewParam is a metadata that added to your page allows you to capture this type of information passed by parameter. Primefaces - link

ViewParam is of the jsf specification, the example of using primefaces is didactic but works the same way with any other library if you are using one.

    
15.03.2016 / 16:30