cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ypomonh <>
Subject Re: Iterate multiple request parameters in a map pipeline..?
Date Mon, 21 May 2007 14:31:07 GMT
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;
    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 :)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message