There is a way. Not that straightforward, though.One way to make this easier would be to make FOM_Request/Response/Session/Context implement the Request/Response/Session/Context interfaces. These interfaces would not be accessible in JS code but would be in Java code. The only drawback is for code that attempts to downcast e.g. Request to HttpRequest which would not work. Since HttpRequest is a class, not an interface, it cannot be implemented by FOM_Request. Given that is the case, such downcasting is probably a Bad Thing (TM) anyway.
You should use the new cocoon.createObject(classname) method that instanciates an object and goes through the various lifecycle interfaces. Your class has to be Contextualizable, and you can then get the request from the context using ContextHelper.getRequest(context).
Now I agree with you that having a restricted object model in the flow is too much constraining.
Sylvain
Sylvain Wallez wrote:
- Hiding business logic in flow: how to get at naked requ... Hunsberger, Peter
- Re: Hiding business logic in flow: how to get at n... Sylvain Wallez
- Re: Hiding business logic in flow: how to get ... Christopher Oliver
- Re: Hiding business logic in flow: how to ... Sylvain Wallez
- RE: Hiding business logic in flow: how to get at n... Hunsberger, Peter
- RE: Hiding business logic in flow: how to get at n... Hunsberger, Peter
