The method

    public String[] getParameters(final String key) {
        return (String[])parameters.keySet().toArray();
    }

do not use argument 'key' and return all parameters. I guess it should be:

    public String[] getParameters(final String key) {
        return getHttpServletRequest().getParameterValues(key) ;
    }

While I debug this problem, I found that getParameterMap() in WebRequest:

    public Map getParameterMap() {
        final Map map = new HashMap();

        for (final Enumeration enumeration = httpServletRequest.getParameterNames(); enumeration
                .hasMoreElements();) {
            final String name = (String)enumeration.nextElement();
            map.put(name, httpServletRequest.getParameter(name));
        }
        return map;
    }

this implementation assumes that each parameterName has "only one" parameter String.
If there are multiple parameters for particular parameterName, only first one is used.
The servlet 2.4 API also comes with the same method on ServletRequest ,but
the map it returned is in String:String[] pair.

Does Wicket not allow multiple parameters for the same parameterName ?

--
Ingram Chen
Java [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwan
blog: http://www.javaworld.com.tw/roller/page/ingramchen

Reply via email to