entity_viewdata.js 647 B

123456789101112131415161718192021222324
  1. var service_base_path = '../jaxrs/view';
  2. function dataList() {
  3. var query_url = service_base_path + "/viewdata/list/{id}/next/{count}";
  4. var id = $("#id").val();
  5. var count = $("#count").val();
  6. query_url = query_url.replace( "{id}",id );
  7. query_url = query_url.replace( "{count}",count );
  8. $.ajax({
  9. type : 'post',
  10. dataType : 'json',
  11. contentType : 'application/json; charset=utf-8',
  12. url : query_url ,
  13. xhrFields : {
  14. 'withCredentials' : true
  15. },
  16. data : JSON.stringify($.parseJSON($('#content').val())),
  17. crossDomain : true
  18. }).done(function(json) {
  19. $('#result').html(JSON.stringify(json.data, null, 4));
  20. });
  21. }