Sylvain Wallez wrote:

Let me just explain how this works:
- I added two classes to CForms (about 3 weeks ago), namely ContainerAsMap and RepeaterAsList. These classes are a Map and a List implementations (live wrappers) on top of a container widget and a repeater respectively. - I added jdbi.jar, a 64k jar that provides List and Map implementations on top of a JDBC ResultSet (List for all rows, Map for one row), and PreparedStatements with named parameters fetched from a Map rather than positional parameters as regular JDBC

And the rest is just about using the collection API. Map.putAll(), List.addAll(), plus a bit of JS glue to have a more JS-friendly syntax.

Forgot to say: jdbi is used *only* in the sample, and can be removed with zero impact on the CForms code base.

Sylvain

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director

Reply via email to