implementing row expand using master detail data
implementing row expand using master detail data
i was looking to implement https://datatables.net/examples/server_side/row_details.html
my master REST get returns data on http://127.0.0.1:7101/MUDRESTService/rest/v1/feedbacks and results data like:
{
AppVersion: "v1.1"
EnterpriseId: null
FeedbackId: 410
FeedbackType: "Error"
ObjectVersionNumber: 1
Os: "iOS"
OsVersion: "8.4"
OscVersion: "11.1.10.0.0"
ReportedBy: "sales_representative"
ReportedDate: "2015-11-18T01:03:16-08:00"
ServerUrl: "my url"
Platform: "iPad Simulator"
Model: "iPad Simulator x86_64"
links: [1]
0: {
rel: "child"
href: "http://127.0.0.1:7101/MUDRESTService/rest/v1/feedbacks/410/child/MudFeedbackDetailsVO"
name: "MudFeedbackDetailsVO"
kind: "collection"
}
}
the child link returned by response shows data on firing REST http://127.0.0.1:7101/MUDRESTService/rest/v1/feedbacks/410/child/MudFeedbackDetailsVO
{
CriticalPath: "Tue Nov 17 16:05:22 PST 2015::::start of activate()#~#Tue Nov 17 16:05:23 PST 2015::::End of activate()#~#Tue Nov 17 16:07:45 PST 2015::::start of checkOut()#~#"
FeedbackDetailId: 411
FeedbackId: 410
MappingCode: null
Message: null
I want render things from the chid VO when some one click on master row. Going through doc I got no clue on how to get it working. the example assumes that child data returns with the parent in the single call.
any advise please.
my current code is:
$(document).ready(function() {
var dt =$('#feedback-data-table').DataTable( {
ajax: {
url: "http://127.0.0.1:7101/MUDRESTService/rest/v1/feedbacks?limit=99",
dataSrc: "items"
},
columns: [
{ title: "App Version", data: "AppVersion" },
{ title: "Feedback Type", data: "FeedbackType" },
{ title: "OS", data: "Os" },
{ title: "OS Version", data: "OsVersion" },
{ title: "Platform", data: "Platform" },
{ title: "Model", data: "Model" },
{ title: "User", data: "ReportedBy" },
{ title: "Date", data: "ReportedDate"},
{ title: "Server Url", data: "ServerUrl" }
]
} );
Answers
any help on this plz?