• plusplusben
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Does anyone know if it's possible to use the URL Rewriting functionality for plain old visualforce pages that aren't part of a site?

Does anyone know if it's possible to use the URL Rewriting functionality for plain old visualforce pages that aren't part of a site?

Hi,

 

I would like to know if we can sort a Map by Value. I have a Map like below.

 

Map<Id, Integer> accMap = new Map<Id, Integer>();

 

e.g I have values in the Map like below

 

accMap.put('Id1' , 2);

accMap.put('Id2' , 1);

accMap.put('Id3' , 4);

accMap.put('Id4' , 3);

accMap.put('Id5' , 5);

 

Now i want the Map to be sorted by the Integer value and my output should be like below

 

accMap.put('Id5' , 5);

accMap.put('Id3' , 4);

accMap.put('Id4' , 3);

accMap.put('Id1' , 2);

accMap.put('Id2' , 1);

 

 

Any help will be appriciated.

 

Thanks

 

Bramha