Announcement Announcement Module
Collapse
No announcement yet.
Losting dropbox sort order Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Losting dropbox sort order

    I am losting soft order of my list as I convert to Map.. How else can I do this... Spring needs my list as a Map<String, String> for my dropbox


    Map<String, String> selectableReporters = new HashMap<String, String>();
    List<NameID_lookupModel> lstReports = database.getSelectableReporters();

    for (NameID_lookupModel i : lstReports) selectableReporters.put(i.getID(), i.getName() + " - " + i.getID());

  • #2
    I got this one working by doing the following:

    LinkedHashMap<String, String> selectableReporters = new LinkedHashMap<String, String>();
    List<NameID_lookupModel> lstReports = database.getSelectableReporters();

    for (NameID_lookupModel i : lstReports) selectableReporters.put(i.getID(), i.getName() + " - " + i.getID());

    Comment

    Working...
    X