cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Pietschmann" <>
Subject Re: Action: How to get Request in initialize()?
Date Fri, 12 Aug 2005 09:13:25 GMT
Since this Action also extends ServiceableAction it would be even better if
I could get the Request in service() . but there I'm missing the objectModel
as well.





Von: Stefan Pietschmann [] 
Gesendet: Freitag, 12. August 2005 11:00
An: ''
Betreff: Action: How to get Request in initialize()?




I'm writing an Abstract Action to be used by other Actions, which shall
fetch things like the AuthenticationContext and the Request before act() is
called by the subclasses. So it implements Initializable and does those
things in initialize(). 


The problem is: in act() I have the objectModel to do something like this:
this.request = ObjectModelHelper.getRequest(objectModel);, however I don't
have the objectModel in initialize()! How else could I get the Request?


If this works, initialize() is called before act, and is there some standard
method that is called after act? I would use that to write things back to
the AuthenticationContext without the subclass needing to call another





Perhaps I'm totally wrong anyway since I'm not sure when initialize is
called exactly and if I can use it like that at all.

View raw message