Berin,
I have successfully configured Cocoon (2.1.7) to store non-String Objects
in the Cocoon request (and access the same within JXTemplate) using a
custom Action. The trick is to store the Object in the Request object
instead of the SiteMap, and access using the request object within your
JXTemplate.
Let me know if you're interested and I can share some code samples with
you, to get you started in the right direction.
Ian
It's better to be hated for who you are
than loved for who you are not
Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078
Berin Loritsch
<[EMAIL PROTECTED] To:
[email protected]
n.org> cc:
Subject: Re: JXel Issues, Won't
recognize params from sitemap
03/23/2006 11:33
PM
Please respond to
users
Bruno Dumon wrote:
> On Thu, 2006-03-23 at 15:27 -0500, Berin Loritsch wrote:
>
>> I need to pass parameters into my Jexl. As long as the call to the
>> resource originally comes from the flowscript, everything seems to be
>> OK. HOwever, I can't seem to pass parameters directly from the sitemap.
>>
>> Anyone know what's going on?
>>
>
> There are indeed some differences between calling JXTemplate from flow
> or directly, though I don't recall what these were exactly (would need
> to check the sources). Some things you might try until someone more
> experienced helps you:
>
> * instead of "cocoon.parameters", use just "parameters"
> * try JXPath instead of Jexl: #{$cocoon/parameters/something}
> * or if you're on Cocoon 2_1_x head, use the template block instead
> (just switch the jx declaration to o.a.c.template.JXTemplateGenerator)
> which should solve these differences
>
>
It turns out that you can't use Java Objects other than string if you
are passing from the sitemap. I consider this to be a bug.
Particularly since you can't pass in anything through
cocoon.request.getAttribute() unless you go through a flowscript?!? I
eventually had to bounce the request through a flowscript just to get
the value passed. It's a pain in the arse.
---------------------------------------------------------------------
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]