Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var _url = (xxx.contextPath + '/documenttype/getextension/'+ val);
- $.getJSON(_url).done(function (data) {
- if(data){
- $('#documents').attr('accept', data);
- }
- }).fail(function( jqxhr, textStatus, error ) {
- var err = textStatus + ", " + error;
- alert(err);
- });
- @ResponseBody
- @RequestMapping(value = "/getextension/{typeId}", method =
- RequestMethod.GET)
- public String findExtension(@PathVariable Long typeId) {
- String ext = getEntityService().findExtension(typeId);
- // json requires string with double quotes
- ext = new StringBuilder(""").append(ext).append(""").toString();
- return ext;
- }
- [{"id":40,"createdBy":1,"createdDate":"21/11/2017
- 12:49","updatedBy":1,"updatedDate":"21/11/2017 12:49","version":0,"group":
- {"id":23,"createdBy":1,"createdDate":"21/11/2017
- 12:49","updatedBy":1,"updatedDate":"21/11/2017
- 12:49","version":0,"code":"ALTDISPUTERES","name":"Alternative Dispute
- Resolution","store":
- {},"systemGenerated":false,"position":0,"displayAll":false,"handler":.....
Add Comment
Please, Sign In to add comment