cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Oliver" <coli...@SeeBeyond.com>
Subject request attribute access in JXTemplate (was RE: Woody template transformer using jx macros)
Date Mon, 05 Jan 2004 23:16:31 GMT

-----Original Message-----
From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net] 
Sent: Monday, January 05, 2004 8:55 AM
To: dev@cocoon.apache.org
Subject: Re: Woody template transformer using jx macros

Sylvain Wallez wrote:

> Vadim Gritsenko wrote:
>
>> Sylvain Wallez wrote:
>> ....
>>
>>>    <jx:when test="$widget.getWidget("items").size > 0">
>>
>>
>>
>>
>> Thanks for JXTemplateGenerator example. I assume $widget here should 
>> be woody form, which is stored in the request attribute, and 
>> according to [1], method call syntax is a bit different from the 
>> above. So I ended up with:
>>
>>  <jx:when test="getWidget(getAttribute($request, "form"), 
>> "items")/size > 0">
>

Correction:
  <jx:when test="#{getWidget(getAttribute($request, "form"), 
"items")/size > 0}">

With the latest version of JXTemplate you can also do this:

<jx:when test="#{getWidget($cocoon/request/form, "items")/size > 0}">

Mime
View raw message