This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSF and the fly likes PhaseListener for one Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "PhaseListener for one Page" Watch "PhaseListener for one Page" New topic

PhaseListener for one Page

Shruti B

Joined: Jan 19, 2006
Posts: 7
Hello All:

How can i make a phase listener, page scoped.
i.e i want it to be called only for a particular page.
getviewId() --> does not give me the wanted result.
It always gives me the previous URL.

Please Help.

Thanks and Regards,

Regards,<br />Shruti
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
I wonder if writing a PhaseListener for the sake of one page is the best solution, but to answer your question: try using the following listener to understand what is going on:

When does the view id change?

There is no emoticon for what I am feeling!
I agree. Here's the link:
subject: PhaseListener for one Page
It's not a secret anymore!