form_parameter = { first : '(0)', last : '(0)', count : 20 }; function form_list_next(id) { var id = (id ? id : form_parameter.last); $.ajax({ type : 'get', dataType : 'json', url : '../jaxrs/form/list/' + id + '/next/' + form_parameter.count, xhrFields : { 'withCredentials' : true }, crossDomain : true }).done(function(json) { if (json.type == 'success') { if (json.data.length > 0) { form_parameter.first = json.data[0].id; form_parameter.last = json.data[json.data.length - 1].id; } else { form_parameter.first = '(0)'; } form_list_grid(json); } }).always(function(json) { $('#result').html(JSON.stringify(json, null, 4)); }); } function form_list_prev(id) { var id = (id ? id : form_parameter.first); $.ajax({ type : 'get', dataType : 'json', url : '../jaxrs/form/list/' + id + '/prev/' + form_parameter.count, xhrFields : { 'withCredentials' : true }, crossDomain : true }).done(function(json) { if (json.type == 'success') { if (data.data.length > 0) { form_parameter.first = json.data[0].id; form_parameter.last = json.data[json.data.length - 1].id; } else { form_parameter.last = '(0)'; } form_list_grid(json); } }).always(function(json) { $('#result').html(JSON.stringify(json, null, 4)); }); } function form_list_grid(json) { var str = ''; str += ''; str += ''; if (json.data) { $.each(json.data, function(index, item) { str += ''; str += ''; str += ''; str += ''; str += ''; str += ''; }); } str += '
  ' + json.count + '
idnameapplicationoperate
' + item.id + '' + item.name + '' + item.application + ''; str += 'edit '; str += 'delete'; str += '
'; $('#content').html(str); $('#next').click(function() { form_list_next(); }); $('#prev').click(function() { form_list_prev(); }); } function form_query() { str = ''; str += ''; str += ''; str += ''; str += '
listWithApplication listFormFieldWithApplication listFormFieldWithForm
application id
form id
'; $('#content').html(str); $('#listWithApplication').click(function() { form_listWithApplication($('#applicationId').val()); }); $('#listFormFieldWithApplication').click(function() { form_listFormFieldWithApplication($('#applicationId').val()); }); $('#listFormFieldWithForm').click(function() { form_listFormFieldWithForm($('#formId').val()); }); } function form_create_init() { str = ''; str += ''; str += ''; str += ''; str += '
post
application:
name:
description: