-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Grzegorz Kossakowski wrote:
> Giacomo Pati pisze:
>> Here it is :-)
>>
>
> <snip/>
>
> I agree, it's *ugly* :-)
:-)
<snip/>
> 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 pipelineComponent
>>> 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" one.
>>> 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 your
> 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">
${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 Hash
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.
>
>>> 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, though)
>> 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
;-)
Ciao
- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.6 (GNU/Linux)
iD8DBQFG6i3qLNdJvZjjVZARAjh5AJ9j6OTti72SjEcJjguqEqkK7R7P5wCdGhHi
bSf6YzAdjFsZ4eNH80UQ0Kw=
=tByw
-----END PGP SIGNATURE-----