cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: pipelineComponent scope troubles
Date Fri, 14 Sep 2007 10:09:53 GMT
Giacomo Pati pisze:
> Ok, so this is the snippet where it is used:
>     <a href="view-my-tasks" id="view-my-tasks">
>       ${status.myTasks.size()}
>     </a>
> As it is part of the content surrounding of that page it was included by a XSLT via:
>   <ci:include element="status" src="cocoon:/user-status" />
> which was processed by a
>   <map:match pattern="user-*">
>     <map:read src="screens/user-{1}.xml" />
>   </map:match>
> and initially called by a flowscript that sets the status variable up as a native Javascript
>   var status = { myTasks: taskManager.getTasks() };
> whereas the taskManager.getTasks() returns a List
> So the general process is that a flowscripts calls the pipeline descibed in my earlier
mail with a
> hash of informations where that pipeline expands the initial xml into cinclude which
gets included
> to the final page.

I want to reproduce your setup so I will want to make sure that I understand your flow in

flowscript_function (sets status.myTasks)
  * <map:match pattern="screen/**">
      o <map:generate src="servlet:bfabric-core:/screen/{1}" />
          # generator
          # xslt (creates <ci:include element="status" src="cocoon:/user-status" />)
          # cinclude
          # jx transformer <- here status.myTasks is used
          # serialize
      o [...]

Apart from my guesses above I would like to ask you for one more thing, could you set scope
of OM to
request (I hope we support standard Spring scopes) and singleton if request does not work.
warned, that setting it to singleton is just for testing; it will screw up your app as soon
second request is processed.

Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon

View raw message