cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: loop thru woody repeaters
Date Mon, 24 Oct 2005 18:49:41 GMT
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


Mime
View raw message