cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandor Spruit <>
Subject Re: Passing Java Objects from FlowScript to pipeline components?
Date Wed, 24 Aug 2005 08:39:18 GMT
footh wrote:
> If all you want to do is pass an object from flow to transformer, as
> David suggested I believe you can just stick it in the request and
> pick it up using the getRequest().getAttribute() method of the
> transformer.
> I've been successful doing this with a session object (by calling
> getRequest().getSession().getAttribute()). It seems like it should
> work just fine with request scope.

OK, I've looked into this a bit further. The set of parameters I want
to access in my pipeline needs to be used in:

- custom Cocoon components (no problem, it's Java)
- FlowScript (no problem, can call Java)
- JXTemplates, XSLT stylesheets ??

I can write: ${cocoon.session.myparameter}
     but not: ${cocoon.session.myparamset.get('first')}

In other words: I can use the session object to store Java objects of an 
*aggregated* data type (Collection type), and I can iterate over it. But 
if I want to access the same parameters in JX or XSLT, I need to have an 
  *individual* parameter available. Right?

So, to avoid ridiculous amounts of glue code to copy parameters, I could 
refactor to code to avoid using too many parameters in JX/XSLT. As this 
search engine thing will probably develop further (more parameters!)...

Pardon me for discussing all of this on the list, but I think it may be 
a recurring issue. Comments still welcome,


Information and Computing Sciences, Utrecht University, the Netherlands
'Content and knowledge engineering'
Personal coordinates:
"... unthinkable surprises, about to happen, but what they are -
  it's not up to you, oh, it never really was."  (Bjork on Vespertine)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message