File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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!