complex_parameter = {};
function complex_query_init() {
var str = '
';
$('#content').html(str);
$('#company').click(function() {
complex_query_company($('#query').val());
});
$('#department').click(function() {
complex_query_department($('#query').val());
});
$('#person').click(function() {
complex_query_person($('#query').val());
});
}
function complex_query_company(id) {
$('#result').html('');
$.ajax({
type : 'get',
dataType : 'json',
url : '../jaxrs/complex/company/' + id,
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function complex_query_department(id) {
$('#result').html('');
$.ajax({
type : 'get',
dataType : 'json',
url : '../jaxrs/complex/department/' + id,
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function complex_query_person(id) {
$('#result').html('');
$.ajax({
type : 'get',
dataType : 'json',
url : '../jaxrs/complex/person/' + id,
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}