Re: accessing sitemap parameters in a flow script

2003-08-31 Thread Sylvain Wallez
Vadim Gritsenko wrote: Marc Portier wrote: snip/ There's already a parameters property in the cocoon object. We can have : function whatever() { doSomething(cocoon.parameters.x, cocoon.parameters.y); } And nobody still answered the question: why passing of parameters into the function

Re: accessing sitemap parameters in a flow script

2003-08-23 Thread Sylvain Wallez
Marc Portier wrote: Sylvain Wallez wrote: Stefano Mazzocchi wrote: snip / If we match by variable name rather than by position, it would work anyway. ... but I have the feeling I'm missing a big point here. Yeah : the point is that parameters are passed as Object[] to a JS function. The

Re: accessing sitemap parameters in a flow script

2003-08-23 Thread Marc Portier
Sylvain Wallez wrote: Marc Portier wrote: Sylvain Wallez wrote: Stefano Mazzocchi wrote: snip / If we match by variable name rather than by position, it would work anyway. ... but I have the feeling I'm missing a big point here. Yeah : the point is that parameters are passed as

Re: accessing sitemap parameters in a flow script

2003-08-23 Thread Vadim Gritsenko
Marc Portier wrote: snip/ There's already a parameters property in the cocoon object. We can have : function whatever() { doSomething(cocoon.parameters.x, cocoon.parameters.y); } And nobody still answered the question: why passing of parameters into the function function whatever(x, y, z)

Re: accessing sitemap parameters in a flow script

2003-08-22 Thread Stefano Mazzocchi
On Wednesday, Aug 20, 2003, at 11:27 Europe/Rome, Sylvain Wallez wrote: Stefano Mazzocchi wrote: On Friday, Aug 15, 2003, at 23:49 Europe/Rome, Sylvain Wallez wrote: snip/ And this really demonstrates how dangerous can be this translation to positional parameter ;-) why don't we fix this,

Re: accessing sitemap parameters in a flow script

2003-08-20 Thread Sylvain Wallez
Stefano Mazzocchi wrote: On Friday, Aug 15, 2003, at 23:49 Europe/Rome, Sylvain Wallez wrote: snip/ And this really demonstrates how dangerous can be this translation to positional parameter ;-) why don't we fix this, then? Well, positional parameters have been there since day one in

Re: accessing sitemap parameters in a flow script

2003-08-19 Thread Stefano Mazzocchi
On Friday, Aug 15, 2003, at 23:49 Europe/Rome, Sylvain Wallez wrote: Andreas Hartmann wrote: Sylvain Wallez wrote: [...] map:call function=foo map:parameter name=bar value=baz/ /map:call function foo(bar) { ... } This syntax turns named parameters in the sitemap into positional

accessing sitemap parameters in a flow script

2003-08-15 Thread Steven Noels
Hi all, I guess the title says about all. ;-) I want to dynamically load a Woody form definition, its name being based on the URI invoking the flow function. What's the easiest way to do this? I saw some very similar questions pass by, but I fail to find out whether this is already

Re: accessing sitemap parameters in a flow script

2003-08-15 Thread Sylvain Wallez
Steven Noels wrote: Hi all, I guess the title says about all. ;-) I want to dynamically load a Woody form definition, its name being based on the URI invoking the flow function. What's the easiest way to do this? I saw some very similar questions pass by, but I fail to find out whether this

Re: accessing sitemap parameters in a flow script

2003-08-15 Thread Sylvain Wallez
Sylvain Wallez wrote: var x = cocoon.parameters[baz]; Ooops. Should be var x = cocoon.parameters[bar]; of course. Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon,

Re: accessing sitemap parameters in a flow script

2003-08-15 Thread Steven Noels
Sylvain Wallez wrote: map:call function=foo map:parameter name=bar value=baz/ /map:call and function foo() { var x = cocoon.parameters[baz]; } Easy, no ? Ha. ;-) Added to the Wiki. :-) /Steven -- Steven Noelshttp://outerthought.org/ Outerthought - Open Source,

Re: accessing sitemap parameters in a flow script

2003-08-15 Thread Andreas Hartmann
Sylvain Wallez wrote: map:call function=foo map:parameter name=bar value=baz/ /map:call and function foo() { var x = cocoon.parameters[baz]; } It's even easier: map:call function=foo map:parameter name=bar value=baz/ /map:call function foo(bar) { ... } Andreas

Re: accessing sitemap parameters in a flow script

2003-08-15 Thread Sylvain Wallez
Andreas Hartmann wrote: Sylvain Wallez wrote: map:call function=foo map:parameter name=bar value=baz/ /map:call and function foo() { var x = cocoon.parameters[baz]; } It's even easier: map:call function=foo map:parameter name=bar value=baz/ /map:call function foo(bar) { ... } This