Guest User

Untitled

a guest
Dec 11th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. var _url = (xxx.contextPath + '/documenttype/getextension/'+ val);
  2. $.getJSON(_url).done(function (data) {
  3. if(data){
  4. $('#documents').attr('accept', data);
  5. }
  6. }).fail(function( jqxhr, textStatus, error ) {
  7. var err = textStatus + ", " + error;
  8. alert(err);
  9. });
  10.  
  11. @ResponseBody
  12. @RequestMapping(value = "/getextension/{typeId}", method =
  13. RequestMethod.GET)
  14. public String findExtension(@PathVariable Long typeId) {
  15. String ext = getEntityService().findExtension(typeId);
  16. // json requires string with double quotes
  17. ext = new StringBuilder(""").append(ext).append(""").toString();
  18. return ext;
  19. }
  20.  
  21. [{"id":40,"createdBy":1,"createdDate":"21/11/2017
  22. 12:49","updatedBy":1,"updatedDate":"21/11/2017 12:49","version":0,"group":
  23. {"id":23,"createdBy":1,"createdDate":"21/11/2017
  24. 12:49","updatedBy":1,"updatedDate":"21/11/2017
  25. 12:49","version":0,"code":"ALTDISPUTERES","name":"Alternative Dispute
  26. Resolution","store":
  27. {},"systemGenerated":false,"position":0,"displayAll":false,"handler":.....
Add Comment
Please, Sign In to add comment