FormTester method  "selectMultiple(String,  int[],  boolean)  change order of 
choices
-------------------------------------------------------------------------------------

                 Key: WICKET-3012
                 URL: https://issues.apache.org/jira/browse/WICKET-3012
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4.10
         Environment: Windows Xp SP3
            Reporter: Massimiliano Zambrini
            Priority: Minor


Sorry for my english.
When I invoke the method selectMultiple("component", new int[] { 0, 1 },  true) 
I walk through the follwing code on FormTester class:

        String[] values = 
baseWicketTester.getServletRequest().getParameterValues(
                                formComponent.getInputName());
                        // remove duplicated
                        HashSet<String> all = new 
HashSet<String>(Arrays.asList(values));
                        all.add(value);
                        Map<String, String[]> newParameters = new 
HashMap<String, String[]>();
                        newParameters.put(formComponent.getInputName(), 
all.toArray(new String[all.size()]));
                        
baseWicketTester.getServletRequest().setParameters(newParameters);

The value for newParameters was [1,0].
When I invoke the method getChoices() from my component I get inverted List.

If I select same elements on real application I get correct list order.

thank you!


g new int[] { 0, 1 }v the parameter value for entry for setting parameter 





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to