On 12/13/05, Ryan Wynn <[EMAIL PROTECTED]> wrote:
> On 12/13/05, Julián García <[EMAIL PROTECTED]> wrote:
> > Thanks.
> >
> > I included this in my config xml
> >
> > <lifecycle>
> > <phase-listener>co.com.atenaerp.seguridad.acegi.jsf.AccessDecicionManagerPhaseListener</phase-listener>
> > </lifecycle>
> >
> > within the application tag....but now it doesn't print anything at
> > all!.....what could be wrong.....
> >
> > Thanks in advance
> >
> > Bruno Aranda wrote:
> > > It seems that the PhaseListener is being registered several times.
> > > Have you added the faces-config.xml in the javax.faces.CONFIG_FILES
> > > context parameter in the web.xml file? If so, you should remove that,
> > > as the faces-config.xml file is parsed by default, so it is not
> > > necessary to add it again in this context parameter, as it will be
> > > parsed twice (and your phase listener added again). You should check
> > > that your component is registering only once when the application
> > > starts up.
> > >
> > > Regards,
> > >
> > > Bruno
> > >
> > > 2005/12/13, Julián García <[EMAIL PROTECTED]>:
> > >
> > >>This is a basic question. I am just finishing a PhaseListener to be
> > >>executed after the RENDER_RESPONSE phase. I add the listener to all my
> > >>beans by executing the following code after setting all the properties
> > >>that are configured in the faces-config:
> > >>
> > >>LifecycleFactory factory =
> > >>(LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
> > >>        Lifecycle lifecycle =
> > >>factory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
> > >>        lifecycle.addPhaseListener(new 
> > >> AccessDecicionManagerPhaseListener());
> > >>
> > >>At the moment, my PhaseListener just prints the url of the page to be
> > >>accessed, but the weird thing is that it is printing the urls several 
> > >>times.
> > >>
> > >>For instance, if i access seguridad/permiso/listadoPermiso.jsp then it
> > >>prints.... /seguridad/permiso/listadoPermiso.jsp 7 times. Is this
> > >>normal? Does this depend on the number of components? Beans referenced
> > >>in the page? How can I force it to print the url just once?.
> > >>
> > >>Thanks for Help.
> > >>
> > >>Julian
> > >>
> > >
> > >
> >
> >
>
>
> I needed to 'deregister' my phase listener from the event in the
> endPhase method.  Otherwise my phase listener was being executed
> multiple times. I can't remember the code off hand but it involved the
> phaseEvent id.
>


Sorry, that was supposed to be the afterPhase event method not endPhase.

Reply via email to