The problem looks really strange; when I rewrite the function call to the java (class with cocoon.session as in-parameter), subsequent tests of the website comes up with an error:


"Function "javascript:preFunction()" not found"
(preFunction() is run before all flowscripts, not just the one where I pass the session.)


Also, I now get the same error in all flowscripts in the webapp- not just the one where I try to pass the session. When I take away all usage of coocon.session as a function parameter, everything works again. Strange!!

-thomas


Joerg Heinicke wrote:
On 11.06.2004 13:14, Thomas Kjeldahl Nilsson wrote:

Hello,

I have some flowscripts with a lot of businesslogic in them. I really want to limit flowscript code to "controller" code; so I'm encapsulating the businesslogic in java objects which are called from the flowscripts.

At a few points in the java code I need to access some attributes in the calling flowscripts current 'cocoon.session'.
I wonder if it is possible to access cocoon.session in my "flowscript-called" java objects?


(I've tried to simply pass the FOM session to the java methods, but that didn't work very well... :)


That's exactly the way to go if you don't want to avalonize your Java methods, what would be overkill IMO. But calling your Java methods with cocoon.session as parameter should work, I do the same for cocoon.request. What's your problem with it?

Joerg


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to