process.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. process_parameter = {};
  2. function process_getComplex_init() {
  3. $('#result').html('');
  4. str = '<table border="1" width="100%">';
  5. str += '<tr><td colspan="2"><a href="#" id="get">get</a></td></tr>';
  6. str += '<tr><td>flag:</td><td><input type="text" id="flag" style="width:95%"/></td></tr>';
  7. str += '</table>';
  8. $('#content').html(str);
  9. $('#get').click(function() {
  10. process_getComplex($('#flag').val());
  11. });
  12. }
  13. function process_getComplex(flag) {
  14. $('#result').html('');
  15. $.ajax({
  16. type : 'get',
  17. dataType : 'json',
  18. url : '../jaxrs/process/' + flag + '/complex',
  19. xhrFields : {
  20. 'withCredentials' : true
  21. },
  22. crossDomain : true
  23. }).always(function(json) {
  24. $('#result').html(JSON.stringify(json, null, 4));
  25. });
  26. }
  27. function process_getAllowRerouteTo_init() {
  28. $('#result').html('');
  29. str = '<table border="1" width="100%">';
  30. str += '<tr><td colspan="2"><a href="#" id="get">get</a></td></tr>';
  31. str += '<tr><td>flag:</td><td><input type="text" id="flag" style="width:95%"/></td></tr>';
  32. str += '</table>';
  33. $('#content').html(str);
  34. $('#get').click(function() {
  35. process_getAllowRerouteTo($('#flag').val());
  36. });
  37. }
  38. function process_getAllowRerouteTo(flag) {
  39. $('#result').html('');
  40. $.ajax({
  41. type : 'get',
  42. dataType : 'json',
  43. url : '../jaxrs/process/' + flag + '/allowrerouteto',
  44. xhrFields : {
  45. 'withCredentials' : true
  46. },
  47. crossDomain : true
  48. }).always(function(json) {
  49. $('#result').html(JSON.stringify(json, null, 4));
  50. });
  51. }
  52. function process_listWithApplication_init() {
  53. $('#result').html('');
  54. str = '<table border="1" width="100%">';
  55. str += '<tr><td colspan="2"><a href="#" id="list">list</a></td></tr>';
  56. str += '<tr><td>applicationFlag:</td><td><input type="text" id="applicationFlag" style="width:95%"/></td></tr>';
  57. str += '</table>';
  58. $('#content').html(str);
  59. $('#list').click(function() {
  60. process_listWithApplication($('#applicationFlag').val());
  61. });
  62. }
  63. function process_listWithApplication(applicationFlag) {
  64. $('#result').html('');
  65. $.ajax({
  66. type : 'get',
  67. dataType : 'json',
  68. url : '../jaxrs/process/list/application/' + applicationFlag,
  69. xhrFields : {
  70. 'withCredentials' : true
  71. },
  72. crossDomain : true
  73. }).always(function(json) {
  74. $('#result').html(JSON.stringify(json, null, 4));
  75. });
  76. }