Daniel McOrmond wrote:

Is it better to 'remember' original request parameters as variables in
flowscript, or to pass them via hidden form fields through the
pipeline? The goal is for the next pipeline to have access to them.



Hehe, during Cocoon trainings, I tell people "untwist your mind, things are simple again". Flowscript keeps the execution state between requests, so you really don't need some hidden inputs hacks if you go from screen to screen using continuations.


Now, I expect that the answer will be that I should use variables
within flowscript. I've seen that the flow tutorial and examples do
things this way.

The only thing I don't like about using flow variables, is that I have
to pass them all through when I call a sendPage or sendPageAndWait. In
this example, I only had one original parameter, but suppose I had 50?
Even worse, suppose that I don't know the names of each parameter, or
that the potential set of provided parameters is highly volitile.



You can use a single JS object variable and add any number of properties to this object.


The advantage to using hidden form fields, is that I can handle any
number of original parameters, and don't have to worry about what
they're named. The request generator gives me all that information for
free, and my stylesheet can transform them easily. The downsides of
this method is that all that data goes back and forth between client
and server, not to mention that it's cheesy and old-school.



Yep. And using flowscript variables doesn't force you to use the request generator.


Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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



Reply via email to