Guest User

Untitled

a guest
May 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. @select(entryForm("entryType"), options(EntryType.options), 'label -> "Type", 'default -> "-- Choose a type --")(twitterBootstrapInput)
  2.  
  3.  
  4.  
  5.  
  6.  
  7. package models;
  8.  
  9. import java.util.LinkedHashMap;
  10. import java.util.Map;
  11.  
  12. public enum EntryType {
  13.  
  14. BLOCK, SCROLL, FLOW;
  15.  
  16. public static Map<String,String> options() {
  17. LinkedHashMap<String,String> options = new LinkedHashMap<String,String>();
  18. for (EntryType e : EntryType.values())
  19. options.put(e.name(), e.name().substring(0, 1) + e.name().toLowerCase().substring(1));
  20. return options;
  21. }
  22.  
  23. }
Add Comment
Please, Sign In to add comment