Hello,

think you'r heading for major headache the way you are trying to use 
Cforms/binding! What your are describing is pretty well possible, but it will 
become unnecessary hard to store your date (how are you planning this? After 
the form is submitted, find out the different fields, and create sql statements 
of these, and.....eventually, it becomes so complex, and database names change, 
causing you to rewrite 100 sql statements)

Take a look at ojb.

Antoher thread has been about this subject (BrickCms)

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=113171846629228&w=2

AS


> 
> 
> Hello,
> 
> I'm doing my first steps with cocoon. This is what I'm trying to do:
> 
> -query data form a database 
> -convert result set to xml
> -display data in a form field
> 
> I have difficulties binding the retrieved xml to the form. 
> The retrieval
> works ok. Please see the sample.xml below original message. 
> It is the output
> of the "fetch-data-.." pipeline which I'm trying to connect 
> to the form
> pipeline.
> 
> For more clarity I would like to post the whole project 
> (without lib's ;o))
> but attachments seem to be not allowed on the list. :o( So I 
> posted the
> necessary resources should anything important be missing just tell me.
> 
> Cheers,
> Pete
> 
> Cocoon version 2.1.8 
> Java: jdk1.5.0_06
> 
> --------------Sample.xml--------------------------
> <rowset xmlns="http://apache.org/cocoon/SQL/2.0";>
>     <row>
>         <substrat>
>             foo
>         </substrat>
>       </row>
>     </rowset>
> 
> 
> ---------------Bind.xml------------------------
> <fb:context 
> xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"; path="/">
> <fb:value id="substrat"
>               path="/rowset/row/substrat"/>
> </fb:context> 
> 
> 
> --------------Definition.xml-------------------
> <fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition";>
>     <fd:widgets>
>         <fd:field id="substrat" required="true">
>             <fd:label>Substrat</fd:label>
>             <fd:datatype base="string">
>             </fd:datatype>
>         </fd:field>
>     </fd:widgets>
> </fd:form>
> 
> -------------flow.js-------------------------------
> 
> function respond() {
>     var form = new Form("documents/form/definition.xml");
>     form.createBinding("documents/binding/bind.xml");
>     form.load("fetch-data-pipeline");
>     form.showForm("display-pipeline");
> }
> 
> -------------Sitemap.xmap---------------------
> <map:pipeline>
>      <map:match pattern="fetch-data-pipeline">
>          <map:generate type="file" src="documents/sql/sql.xml"/>
>          <map:transform type="sql">
>             <map:parameter name="use-connection" value="oracle-pool"/>
>          </map:transform>
>            <map:serialize type="xml"/>
>       </map:match>
>  </map:pipeline>
> 
>    <map:pipeline>
>      <map:match pattern="display-pipeline">
>        <map:generate src="documents/form/template.xml"/>
>        <map:transform type="forms"/>
>        <map:call resource="simple-page2html">
>          <map:parameter name="file" 
> value="documents/form/template.xmll"/>
>        </map:call>
>        <map:transform
> src="documents/stylesheets/forms-samples-styling.xsl"/>
>        <map:serialize/>
>      </map:match>
>    </map:pipeline>
> 
> 
> 
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]