You need to sign in to do that
Don't have an account?
Aruna
Map descending and ascending sorting on vf page when user clicks on command link --> urgent help me
Hi is anyone got the solution to this sorting problem.
I am unable to do descending order sorting.
My requirement is I have map Of <Id,Name> when user click on the link the map values need to sort either ascending or descending order
Example If the Map values contain
Map.put(id1,Name1);
Map.put(id3,Name3);
Map.put(id2,Name2);
Map.put(id5,Name5);
Map.put(id6,Name6);
Map.put(id4,Name4);
Result for ascending
Map.put(id1,Name1);
Map.put(id2,Name2);
Map.put(id3,Name3);
Map.put(id4,Name4);
Map.put(id5,Name5);
Map.put(id6,Name6);
Result for desendoing\
Map.put(id6,Name6);
Map.put(id5,Name5);
Map.put(id4,Name4);
Map.put(id3,Name3);
Map.put(id2,Name2);
Map.put(id1,Name1);
I did use different methods to solve this but nothing is working me out. Please, anyone, help me out I need to solve this issue.
One ve page I need to display these values.
Thank you
Aruna
I am unable to do descending order sorting.
My requirement is I have map Of <Id,Name> when user click on the link the map values need to sort either ascending or descending order
Example If the Map values contain
Map.put(id1,Name1);
Map.put(id3,Name3);
Map.put(id2,Name2);
Map.put(id5,Name5);
Map.put(id6,Name6);
Map.put(id4,Name4);
Result for ascending
Map.put(id1,Name1);
Map.put(id2,Name2);
Map.put(id3,Name3);
Map.put(id4,Name4);
Map.put(id5,Name5);
Map.put(id6,Name6);
Result for desendoing\
Map.put(id6,Name6);
Map.put(id5,Name5);
Map.put(id4,Name4);
Map.put(id3,Name3);
Map.put(id2,Name2);
Map.put(id1,Name1);
I did use different methods to solve this but nothing is working me out. Please, anyone, help me out I need to solve this issue.
One ve page I need to display these values.
Thank you
Aruna
storedMap.putAll(temoMap);
Below line of code is in correct
temoMap.addAll(storedMap ,storedMap.get(key));
I did trued using
temoMap.putAll(storedMap ,storedMap.get(key)); but getting error .
Can you please post me an executed version of the code