While that's true, phase listeners don't get triggered in any particular order.

I had problems with the older DataTable because it accessed my
application data from a phase listener, and the data it accessed was
only available after my application's phase listener ran.

Not having examine the code, it could very well be a moot point in
this instance as the listener may never access application data.

I'd rather see it done as a servlet if it could be done that way.   As
for the configuration, well, you're gonna have to add in a config line
for the myfaces extensions anyway.

Being a novice JSF user, give my thoughts only the minor consideration
that they're due, and don't beat me up too badly if I'm saying
something stupid
 :)

-Mike


On 7/14/05, Werner Punz <[EMAIL PROTECTED]> wrote:
> Maksimenko Alexander wrote:
> > Hi!
> > I'm looking at AjaxPhaseListener. It looks great but I have some question -
> > at the end of the method I see
> >            context.responseComplete();
> > but as I understand all checks are performed before listener is invoked.
> > So listener in render phase can't tell controller to skip rendering
> > components. Or I was missed something? (I'm using 1.0.9 version)
> >
> A phase listener is triggerted whenever a request comes in, what ajax
> does is to trigger requests without performing a page refresh, thus the
> whole phase listener chain is called every time an ajax request goes
> against the server.
> 
> So what happens? the user does something xmlhttp triggers a request
> against the server, the phase listener is triggered performs its
> functions, the result is given back and the client does something with it.
> 
> No refresh cycle is performed. The Phase listener is sort of used as a
> request interceptor, kind of like a servlet or servlet filter.
> 
> Hope this helps in understanding what happens. You pretty much can do
> the same by using a servlet, but that way you need an extra entry in the
> web.xml file a phase listener can be defined simply by adding an entry
> in one of the faces-configs, thus it can be delivered automatically with
> a component pack.
> 
> 
> 
>

Reply via email to