This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes PhaseListener Methods not called! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "PhaseListener Methods not called!" Watch "PhaseListener Methods not called!" New topic

PhaseListener Methods not called!

Carlos Conti
Ranch Hand

Joined: Apr 21, 2010
Posts: 113
Hi all,

I am currently going bananas with my problem. This is by far one of the most strangest things I have seen in my short experience with JSF. I have included a PhaseListener in my application. When trying to debug, I have settled breakpoints in the constructor body, and first statements of the beforePhase and afterPhase events. When starting the application, the breakpoint in the constructor is hit correctly, but the other two are never hit!. How is it possible that I can navigate through several pages without hitting them? Even if breaking down in the RESTORE_VIEW phase, at least I should get the breakpoint in the beforePhase method hit, but I do not!. This is driving me crazy, since those methods perform managedbean related updates which are critical to the prompt behaviour of the application.

Any ideas? this had never happened before. can anybody guess what sort of code snipped can cause such behaviour. Apparenty those methods are not called, but that couldn't happen from my understanding sofar.

Thanks for your insights in advance.
Carlos Conti
Ranch Hand

Joined: Apr 21, 2010
Posts: 113
hey! got it!
I was returning null from the getPhaseId() method...
Sorry for the inconvenience... but then does anybody know how can I find out the phase being currently executed, outside of the PhaseListener???
It is sorta covered in the JavaRanch Style Guide.
subject: PhaseListener Methods not called!
Similar Threads
JSF phaseListener
initial page event
Measuring CPU times of a JSF application
Can ActionListener modify some UIComponent?
PhaseListener problem