You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bruce Atherton <br...@callenish.com> on 2005/10/22 02:20:52 UTC
Accessing repeaterLoop variable from Cocoon Forms
I am trying to use repeaters in my application. I have a "More" and
"Less" button to add and remove rows, and a hidden boolean widget to
indicate the last row. For this purpose, I am trying to set the value
using "repeaterLoop.last". Trouble is, that value was never set to
anything. So then I simplified my form to hold this:
<ft:repeater-size id="searchDropDowns" />
<ft:repeater-widget id="searchDropDowns">
Row: <b>${repeaterLoop.index}</b>
</ft:repeater-widget>
Early in the pipeline it looks like this:
<fi:repeater-size id="searchDropDowns" size="1"/>
Row:
<b>${repeaterLoop.index}</b>
After it goes through the JX Transform, it looks like this:
Row: <b></b>
So it looks like I am not getting access the the repeaterLoop object at
all. Any ideas what I am doing wrong or how to fix the problem?
Thanks for any help.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Accessing repeaterLoop variable from Cocoon Forms
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Oct 22, 2005, at 11:14 AM, Bruce Atherton wrote:
> No, I don't have 'jx-macro.xml" imported. In fact, I don't see that
> file anywhere in my cocoon 2.1.7 build.
It's in cocoon-forms.jar
> Should I have it somewhere?
Add this to your JX template:
<jx:import
uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
...and get rid of FormsTemplateTransformer if you have that in your
pipeline.
GL,
—ml—
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Accessing repeaterLoop variable from Cocoon Forms
Posted by Bruce Atherton <br...@callenish.com>.
Sylvain Wallez wrote:
> Bruce Atherton wrote:
>
>> I am trying to use repeaters in my application. I have a "More" and
>> "Less" button to add and remove rows, and a hidden boolean widget to
>> indicate the last row. For this purpose, I am trying to set the value
>> using "repeaterLoop.last". Trouble is, that value was never set to
>> anything. So then I simplified my form to hold this:
>>
>> <ft:repeater-size id="searchDropDowns" />
>> <ft:repeater-widget id="searchDropDowns">
>> Row: <b>${repeaterLoop.index}</b>
>> </ft:repeater-widget>
>>
>> Early in the pipeline it looks like this:
>> <fi:repeater-size id="searchDropDowns" size="1"/>
>> Row:
>> <b>${repeaterLoop.index}</b>
>>
>> After it goes through the JX Transform, it looks like this:
>>
>> Row: <b></b>
>>
>> So it looks like I am not getting access the the repeaterLoop object
>> at all. Any ideas what I am doing wrong or how to fix the problem?
>
>
> Dumb question maybe, but have you imported jx-macro.xml in your JX
> template?
>
>
More likely to be dumb user. No, I don't have 'jx-macro.xml" imported.
In fact, I don't see that file anywhere in my cocoon 2.1.7 build.
Should I have it somewhere?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Accessing repeaterLoop variable from Cocoon Forms
Posted by Sylvain Wallez <sy...@apache.org>.
Bruce Atherton wrote:
> I am trying to use repeaters in my application. I have a "More" and
> "Less" button to add and remove rows, and a hidden boolean widget to
> indicate the last row. For this purpose, I am trying to set the value
> using "repeaterLoop.last". Trouble is, that value was never set to
> anything. So then I simplified my form to hold this:
>
> <ft:repeater-size id="searchDropDowns" />
> <ft:repeater-widget id="searchDropDowns">
> Row: <b>${repeaterLoop.index}</b>
> </ft:repeater-widget>
>
> Early in the pipeline it looks like this:
> <fi:repeater-size id="searchDropDowns" size="1"/>
> Row:
> <b>${repeaterLoop.index}</b>
>
> After it goes through the JX Transform, it looks like this:
>
> Row: <b></b>
>
> So it looks like I am not getting access the the repeaterLoop object
> at all. Any ideas what I am doing wrong or how to fix the problem?
Dumb question maybe, but have you imported jx-macro.xml in your JX template?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org