You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gunter D'Hondt <gu...@sofico.be> on 2005/10/24 15:46:50 UTC
loop thru woody repeaters
Hi,
I want to loop thru a woody repeater it's instances in plain old java
code; doing a form.getWidget("repeatername") doesn't give me much methods
to do that I think?
So:
a repeater with widgets "id" and "name"; data:
id name
1 abc
2 def
and using java flow I want to set the data to:
id name
1 111
2 222
Minor detail: Cocoon 2.1.4
Regards,
Gunter D'Hondt
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: loop thru woody repeaters
Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2005-10-24 at 14:46 +0100, Gunter D'Hondt wrote:
> Hi,
>
> I want to loop thru a woody repeater it's instances in plain old java
> code; doing a form.getWidget("repeatername") doesn't give me much methods
> to do that I think?
you need to cast it to a repeater:
Repeater repeater = (Repeater)form.getWidget("repeatername");
and then use getRow(index) and getSize() methods
>
> So:
> a repeater with widgets "id" and "name"; data:
> id name
> 1 abc
> 2 def
>
> and using java flow I want to set the data to:
> id name
> 1 111
> 2 222
>
>
>
> Minor detail: Cocoon 2.1.4
>
> Regards,
> Gunter D'Hondt
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org