cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <patrick.refond...@pobox.com>
Subject Re: Forms/Flow: Control Flow Behind form.showForm()
Date Wed, 21 Dec 2005 09:13:16 GMT
Bertrand Delacretaz wrote:
> Hi Patrick,
> 
> Le 21 déc. 05, à 08:08, Patrick Refondini a écrit :
> 
>> ...I am looking for hints where to look (doc, source code) to  
>> understand how the decision for the flow control to block to  
>> form.showForm() or continue is made...
> 
> 
> To use form.showForm() you must load the Forms library code, something  
> like
> 
>    cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/ 
> Form.js");
> 
> This tells you where the code comes from, if you're using the standard  
> "V1" Forms.js this is
> 
>   src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/Form.js
> 
> That's where you will find the details. The flowscript debugger  
> (http://wiki.apache.org/cocoon/DebugFlowScripts) can be useful for  
> detailed analysis.
> 
> -Bertrand

Thanks, for the quick answer!

I looked at the source code available on SVN:
http://svn.apache.org/viewcvs.cgi/*checkout*/cocoon/blocks/
in
forms/trunk/java/org/apache/cocoon/forms/flow/javascript/Form.js


Now I am going to reveal my whole Javascript incompetency:

The showForm() function located in Form.js has the following signature:

Form.prototype.showForm = function(uri, viewdata, ttl) { (...) }

Is it the implementation for use case such as:

(...)
// Load form definition  	
var form = new Form(formDefinition);

// Send form to client
form.showForm("some-pipeline.jx");
(...)

It is not quite clear yet how Form.prototype.showForm() can be called 
Form.prototype.showForm() and how a call to 
form.showForm("some-pipeline.jx") is matched something like 
form.showForm("some-pipeline.jx", null, null) ?

Nevertheless I'll need to take a deeper look at this source code and try 
to find some Javascript tutorials ;)

Patrick


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


Mime
View raw message