cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ralston <mich...@ralston.id.au>
Subject Re: content managed dynamic cforms
Date Tue, 04 Jul 2006 00:16:54 GMT
Toby wrote:
> Michael Ralston wrote:
>   
>> It looks like you've basically hard coded your fields into the
>> flowscript. This is what I wanted to avoid.
>>     
>
> Can't you just iterate over the fields with plain javascript?
>   
I ended up doing it with javaflow with the following...

in my flow:
mailer.setForm(form.getModel());

inside mailer:
    public void setForm(Widget widget) {
       
            for (Iterator<Widget> i = ((Form)widget).getChildren(); 
i.hasNext();) {
                Widget w = i.next();
                String key = w.getFullName();
                String value = w.getValue().toString();
                map.put(key, value);
            }
    }

Michael R

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message