On Mon, Jan 19, 2009 at 11:53 AM, Jerome Velociter <[email protected]> wrote:
> Pascal Voitot wrote: > > Hello, > > in the new Servlet Component, there is the Container which contains the > > global environment. > > When it receives an action request, it gets the right Action from the > > ComponentManager and launch the handleRequest function. > > > > Should the Container be injected into Action components to retrieve local > > Request/Response objects or may I misunderstand the model? > > As I understand it, the strategy envisaged is that you always retrieve > the container via ThreadLocal. So it is virtually accessible from the > Actions implementations. > > But I might be wrong :) > > Jerome. > > PS: I think xwiki-action is not wired to anything right now I confirm xwiki-action is not wired to anything. But I understand the Action Component should be injected with a Container to get access to a ThreadLocal Request. Moreover, in the component tutorial, there is an example about Execution injection to get access to an ExecutionContext but the ExecutionContext is not meant to contain the ThreadLocal request but other ThreadLocal context data (as far as I understand the model). As I couldn't find any example with Container injection, I was questioning my vision of the model. Maybe, you could me some lights on this... regards Pascal > > > regards > > Pascal > > _______________________________________________ > > devs mailing list > > [email protected] > > http://lists.xwiki.org/mailman/listinfo/devs > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

