myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafa Pérez" <raja...@gmail.com>
Subject Re: access names of called actions and beans
Date Wed, 02 Jul 2008 09:07:33 GMT
You may extend org.apache.myfaces.application.ActionListenerImpl and
implement javax.faces.event.ActionListener. That way, you can call
super.processAction(actionEvent).

HTH,

Rafa

On Wed, Jul 2, 2008 at 10:38 AM, Michael Heinen <mhn@recommind.com> wrote:
> Hi Rafa,
>
> how does this global ActionListener work?
> I defined one in the faces-config and it's processAction method is called.
> But the action/actionListener of my commands are not executed anymore!
>
> Michael
>
> -----Original Message-----
> From: Rafa Pérez [mailto:rajalin@gmail.com]
> Sent: Mittwoch, 2. Juli 2008 08:29
> To: MyFaces Discussion
> Subject: Re: access names of called actions and beans
>
> You can declare your own global ActionListener in faces-config.xml.
> Every time an action/actionListener is executed, this class will be
> called.
>
> On Tue, Jul 1, 2008 at 9:46 PM, Richard Yee <richard.k.yee@gmail.com> wrote:
>> If you are using Spring, you can also easily do it with AOP.
>>
>> -Richard
>>
>> On Tue, Jul 1, 2008 at 12:23 PM, Stephen Friedrich <trinidad@eekboom.com>
>> wrote:
>>>
>>> I think it's not really feasible with a servlet only, but an interceptor
>>> can easily do it.
>>> See the posts in this thread for a working example:
>>>
>>> http://seamframework.org/Community/SeamPerformanceProblemRewardingWorkaround
>>>
>>> There's a little bit more configuration to do when you are not using Seam,
>>> but not too complicated either way.
>>>
>>> Michael Heinen wrote:
>>>>
>>>> What's the best approach to output the name of the called
>>>> action/actionListener and the name of the corresponding managed beans ?
>>>>
>>>> I want to use a ServletFilter to measure the times for http requests and
>>>> print out these names.
>>>>
>>>> Is there anything generic available via FacesContext? I do not want to
>>>> touch every  managed bean.
>>>>
>>>>
>>>> Or do I have to overwrite org.apache.myfaces.el.MethodBindingImpl in
>>>> order to store the names in requestscope in the "invoke" method?
>>>>
>>>>
>>>> Michael
>>>>
>>>
>>
>>
>
>

Mime
View raw message