Announcement Announcement Module
Collapse
No announcement yet.
[SOLVED] Surf Page Ordering Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [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)

  • #2
    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

    Comment


    • #3
      Fixed in rev 500 - will be in RC1 release.

      Thanks,

      Kev

      Comment

      Working...
      X