Re: url pattern for view individuals users.

Splash Forums PrettyFaces Users url pattern for view individuals users. Re: url pattern for view individuals users.

#22048

The code you posted is already a good example. In this case the userid will be injected into #{bean.userId}. So you don’t have to “get” the value from anywhere. You just have to tell PrettyFaces where it should be stored. :)

See this chapter in the documentation:

http://ocpsoft.com/docs/prettyfaces/3.3.2/en-US/html/Configuration.html#config.pathparams.el

The next step would be to add a page action that get’s executed whenever this URL is accessed. This method could then use the injected ID to load the user from the database.

See this chapter for details on page actions:

http://ocpsoft.com/docs/prettyfaces/3.3.2/en-US/html/Configuration.html#config.actions

I hope this helps :)