cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: Fill woody repeater from flow
Date Fri, 24 Oct 2003 20:05:24 GMT

looks good

however, this got me thinking:

maybe we should get ourselves into making (declarative) binding support 
on java.sql.ResultSets, no?

The biggest catch however is the lack of symmetry in connecting to JDBC 
stuff: binding-back for the 'save is not to be done by handing over a 
resulset back to the jdbc connection :-(

Thoughts like these always kinda set me back on th etrack of just using 
some OR/mapping tool and stopping to think about it...

Still, making cforms (aka woody) easier for the jdbc-fans is a goal we 
should go for, and given the fact that the current implicit symmetry of 
the binding is limiting our thoughts we should maybe just set it asside 
and think allong other paths?

so, any thoughts on the subject dwelling out there?

Timothy Larson wrote:

> --- Timothy Larson <> wrote:
>>I guess I still do not completely grasp JavaScript.
>>It is easy enough from Java, but how would you
>>populate a repeater from a flowscript?
>>The context is I am trying to make a database query
>>by example person search form.
> Never mind.  Why do I figure things out right after I
> break down and ask about them? For posterity here is one,
> not necessarily efficient, way:
> // Perform query and get results in ResultSet "result"
> //   Left as exercise for the reader.
> // Clear the repeater
> while (0 in model.somewidget) { // While model.somewidget[0] exists
>   delete model.somewidget[0];
> }
> // Populate the repeater
> while( {
>   var field1 = result.getString("field1");
>   var field2 = result.getString("field2");
>   var max = model.people.length;
>   var row = model.people[max]; // Magically creates a new row
>   row.field1 = field1;
>   row.field2 = field2;
> }
> --Tim Larson
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search

Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                        

View raw message