cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <cr...@4dconcept.fr>
Subject Re: [CForm] binding question
Date Tue, 03 May 2005 10:37:41 GMT
I see but my problem is elsewhere : I need to load dynamically a binding 
document according a parameter in my selection list.


besides, I have another idea (easier) :

I'll create a first forms with this list and will process dynamically to 
the right form.
By the way, How do I submit dynamically ?
I'm using
     "<fd:on-value-changed><javascript>?</javascript></fd:on-value-changed>"
 but I don't know the flowscript method to submit the document.


Thanks
Lionel









David Verdin wrote:

> You can embed it in your flowscript.
> This is an untested javascript function which should do the trick 
> (derived from the Cocoon samples) :
>
> function MyFunction(form) {
>
>     var baseName = cocoon.parameters["base"];
>    var source = cocoon.parameters["documentURI"];
>
>    // parse the document to a DOM-tree
>
>    var document = loadDocument(source);
>
>    // bind the document data to the form
>    form.load(document);
>
>    // show the form
>    form.showForm(baseName+"-display-pipeline");
>
>    form.save(document);
>   // get the whole set of form inputs
>     var temp = form.getModel();
>    // get the content of the form field you use to define your output 
> document
>    var OutputURI = temp.fieldIndicatingTheOutputURI;
>    // Finally, save your data to the right document.
>    saveDocument(document, OutputURI);
>
> //send whatever registration confirmation page you use.
>    cocoon.sendPage("pipo.html");
> }
>
> Something like this, I guess.
>
> Lionel Crine wrote:
>
>> Hi,
>>
>> I'd like to change my binding document according a field 
>> (selectionList) in my form.
>>
>> How can I do that ?
>>
>> Tnahs
>> Lionel
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>

-- 
Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.46.06.90


Mime
View raw message