Results 1 to 3 of 3

Thread: [SOLVED] Surf Page Ordering

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Posts
    4

    Default [SOLVED] Surf Page Ordering

    Index: src/main/java/org/springframework/extensions/surf/ModelObjectService.java
    ================================================== =================
    --- src/main/java/org/springframework/extensions/surf/ModelObjectService.java (revision 496)
    +++ src/main/java/org/springframework/extensions/surf/ModelObjectService.java (working copy)
    @@ -23,6 +23,7 @@
    import java.util.Comparator;
    import java.util.HashMap;
    import java.util.Iterator;
    +import java.util.LinkedHashMap;
    import java.util.List;
    import java.util.Map;
    import java.util.Vector;
    @@ -717,8 +718,8 @@
    }
    });

    - // Clear the map
    - map.clear();
    + // Use LinkedHashMap to retain insertion order
    + map = new LinkedHashMap<String, ModelObject>(list.size());

    // Copy back the entries now in order
    for (Map.Entry<String, ModelObject> entry: list)
    Zaizi Ltd
    Alfresco consulting, development & support
    www.zaizi.com

  2. #2

    Default

    Thank you for that fix (a little more info might be useful for next time, but I get the idea ) - if the developer who made that silly error was still around I'd slap him with a print out of your post, but he's not so I'll just commit it instead.

    The fixed class will be available in RC1 and the trunk shortly.

    Cheers,

    Kev

  3. #3

    Default

    Fixed in rev 500 - will be in RC1 release.

    Thanks,

    Kev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •