Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Same order in Query Parameters as in URL #12544

Open
vuyko23 opened this issue Jul 5, 2022 · 1 comment
Open

The Same order in Query Parameters as in URL #12544

vuyko23 opened this issue Jul 5, 2022 · 1 comment
Labels

Comments

@vuyko23
Copy link

vuyko23 commented Jul 5, 2022

Hello, can you add possibility to get Query Parameters in the same order that in the URL?

@TatuLund
Copy link
Contributor

In Vaadin 8 and 7, the VaadinRequest#getParameterMap method returns the result directly from javax.servlet.ServletRequest#getParameterMap. So Vaadin does nothing here. JavaDoc from there says, i.e. does not seem to say anything about whether order is preserved or not. So this is purely upto container implementation. The guideline is that you should not depend on order of the query parameters.

    /**
     * Returns a java.util.Map of the parameters of this request.
     * 
     * <p>Request parameters are extra information sent with the request.
     * For HTTP servlets, parameters are contained in the query string or
     * posted form data.
     *
     * @return an immutable java.util.Map containing parameter names as 
     * keys and parameter values as map values. The keys in the parameter
     * map are of type String. The values in the parameter map are of type
     * String array.
     */
    public Map<String, String[]> getParameterMap();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants