|
Fixed in nightly build 20060701 (and in the 1.0.3-SNAPSHOT that will be pushed tonight). Use the new @FacesPhaseListener annotation to declare your listener class (which may, but need not, actually implement PhaseListener). If it does not, you can declare your own handler methods with the @BeforePhase and @AfterPhase annotations -- both of which must mark a public void method that takes a PhaseEvent.
|
|||||||||||||||||||||||||||||||||||||||||||
I've got the runtime code that implements this suggestion completed, but need to build some unit tests for it before it's committed. Basically, I'm adding a @FacesPhaseListener annotation on a class to declare that any instance of that class is interested in being a phase listener, plus @BeforePhase and @AfterPhase methods to specify the actual methods to be invoked. At webapp startup time, any class marked with @FacesPhaseListener will cause an instance to be created, and then a PhaseListener registered with the JSF implementation (via an adapter class if PhaseListener is not implemented directly).