On 11/16/06, Pfau, Oliver <[EMAIL PROTECTED]> wrote:

Another question...is there a difference is I register a phase listener in
my backing bean constructor or in the faces-config.xml ?


One of the issues not yet addressed in this thread is really important ...
when does your phase listener get *unregistered*?  If you register your
phase listener in faces-config.xml, then it is going to last for the
lifetime of the application.  If you register your own phase listener, it is
totally up to you when to deregister it -- and I suspect there will be lots
of application developers who don't remember to deregister their phase
listeners, and end up adding more and more and more copies of them.

If you are in need of services that can be provided by a phase listener, I'd
suggest that you either (a) become an expert in the JavaBeans event listener
patterns, with all its implications, or (b) use a framework like Shale[1]
that deals with this particular complexity and lets your application deal
with *application* related events, without worrying about all the mechanics
of how those events get delivered.

Craig

[1] http://shale.apache.org/

Reply via email to