ypomonh pisze:
Jasha Joachimsthal wrote:
If you don't know which parameters you can expect, how will you handle
them?

It is trivial for a web app to not know exactly what parameters to expect.

As I learned from the mailing list a couple of days ago, for flowscript you can do something similar to:

var map = new Packages.java.util.HashMap();
     var namesEnumeration = cocoon.request.getParameterNames();
   var name = null;
   var value = null;
     while (namesEnumeration.hasMoreElements() ) {
       name = namesEnumeration.nextElement();
       value = cocoon.request.get(name);
       map.put(name, value);
   }

Now you can iterate the map to get parameter name/value pairs, eg. print them one-by-one :)

It depends what you are going to do with these parameters. If you want them included into processed XML in the pipeline just use JX templates for iterating parameters and producing appropriate XML representation.

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

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

Reply via email to