cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: pipelineComponent scope troubles
Date Fri, 14 Sep 2007 06:44:58 GMT
Hash: SHA1

Grzegorz Kossakowski wrote:
> Giacomo Pati pisze:
>> Here it is :-)
> <snip/>
> I agree, it's *ugly* :-)



> I guess that you came across nasty bug in JEXL that tries to evaluate built-in functions
on null values
> and informs about it in very bad way.
> The question is: where and how status.myTasks is supposed to be set? (see below, also)

See below

> <snip/>
>>             <map:match pattern="screen/**">
>>                 <map:select type="resource-exists">
>>                     <map:when test="{1}.xml">
>>                         <map:generate src="{1}.xml" label="content" />
>>                     </map:when>
>>                     <map:otherwise>
>>                         <map:generate src="servlet:bfabric-core:/screen/{1}" />
> Let me guess: status.myTasks is called in that pipeline, right?

Yes, at the end yes called in a pipeline (as everything in Cocoon).

> <snip/>
>>> Not that much, unfortunately because it only shows that something is broken in
>>> scope code so no news here. I suggest to do three things:
>>> 1. Make sure that Object Model is in "call" scope and not in "pipelineComponent"
>>> 2. If there is still a problem, paste whole stack trace, then.
>> See above.
> Thanks Giacomo. Believe me or not, but I think we are much closer to the real cause of
> troubles. In order to cast some spells on OM code I need to know how status.myTasks is
put on OM AND
> how that snippet is called from the bits that need status.myTasks variable later on.

Ok, so this is the snippet where it is used:

    <a href="view-my-tasks" id="view-my-tasks">

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" />

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
to the final page.

>>> Last thing, Giacomo, if you could respond to my mails more often we could find
a solution for your
>>> troubles more quickly. ;)
>>> (take into account that I have exam tomorrow so I will respond on late afternoon,
>> I'll do my best ;-)
> Thanks! Tomorrow (Friday) I plan to work on Cocoon so I will be available whole day and
I hope we
> will manage to push things forward. Sorry for your inconveniences.

NP, many thanks for looking at it. Hope my infos help you, otherwise just yell ;-)


- --
Giacomo Pati
Otego AG, Switzerland -
Orixo, the XML business alliance -

Version: GnuPG v2.0.6 (GNU/Linux)


View raw message