cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Rationalising CForms Flowscript Params
Date Fri, 01 Apr 2005 17:28:56 GMT
Vadim Gritsenko wrote:

> Jeremy Quinn wrote:
>> On 1 Apr 2005, at 15:33, Sylvain Wallez wrote:
> <snip/>
>>> I personally never used this "handleForm" function and consider it 
>>> as some old legacy.
>> Hmmm, I disagree.
>> I never like to embed names of files or pipelines in flowscript 
>> functions.
>> I always pass these in from the sitemap.
>> This way, the sitemap is the place where all paths, filenames, uris 
>> are managed, or the location that consistently retrieves these from a 
>> config, via input-modules.
>> I do not like to spread this around as it makes refactoring more 
>> difficult.

In that case you can still pass <map:parameter name="blah" 
value="forms/{1}.xml> and use cocoon.parameters.blah in the flowscript. 
But I admit that from a lines of code POV, this becomes more verbose 
than the current situation.

> Then I suggest you come up with consistent parameters naming and 
> change this function yourself :-), I'm not against keeping it.

+1 :-)

And since we're at changing this, it would be good to attach this 
function to the Form Javascript class to prevent any name clashes.
  <map:call function="Form.handleForm">
    <map:parameter whatever but consistent/>


Sylvain Wallez                        Anyware Technologies  
Apache Software Foundation Member     Research & Technology Director

View raw message