It's not a secret anymore!
The moose likes JSF and the fly likes redirect & parameter passing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "redirect & parameter passing" Watch "redirect & parameter passing" New topic

redirect & parameter passing

Jan Hruby

Joined: Apr 22, 2009
Posts: 4

I have two different pages personList and personDetail and two managed beans PersonList and PersonDetail. I have a problem to pass a personId parameter to PersonDetail bean when moving from personList to personDetail page. It works fine when I don't use <redirect/> tag in my faces-config.xml file. I suppose that the problem is that first request is created by clicking on commandLink and usage of <redirect/> tag causes creating of new request but I need to use redirect otherwise url don't change. Any ideas how to solve this problem???

I can't use outputLink for passing parameters because there are two different detail pages and I resolve where to go in PersonList.personDetail method

personList.jspx code example


navigation rules

William Caicedo

Joined: Jun 29, 2009
Posts: 1
Well, you could use redirection directly on your code and pass the parameters via querystring like this:


I agree. Here's the link:
subject: redirect & parameter passing
It's not a secret anymore!