If Json document returned from sAjaxSource url only contains one record I will get the "No data available in table" in the table, but if the json doc has multiple records, they render wtihout a problem. Any help would be greatly appreciated, I know I'm just missing something somewhere.
My JQuery:
and my json document:
My JQuery:
var oTable = $('#applicationTableAjax').dataTable({ "bProcessing": true, "sAjaxSource": AjaxUri, "sAjaxDataProp": "applications.application", "bPaginate": true, "bDeferRender":true, "aoColumns": [ { "mData": "applicationId" }, { "mData": "applicationName" }, { "mData": "applDesc" }, { "mData": "businessArea.businessAreaName" }, { "mData": "links.link.3.@href" } ], "aoColumnDefs": [ { "mRender": function(data, type, row){ var uri = "/admin/products?prodURI="; var fullUri = uri + data; var x = fullUri + "&appURI=" + AjaxUri; return "<a href=" + x + ">View Products</a>"; }, "aTargets": [ 4 ] } ] });
and my json document:
{ "applications": { "application": { "createTs": "2013-04-08T14:08:21.118-05:00", "createUserid": "test", "lastChangeTs": "2013-04-08T14:08:21.118-05:00", "lastChangeUserid": "test", "version": "143", "links": { "link": [ { "@href": "http://localhost:8080/translator-web/businessareas/16/applications/1", "@rel": "delete" }, { "@href": "http://localhost:8080/translator-web/businessareas/16/applications/1", "@rel": "self" }, { "@href": "http://localhost:8080/translator-web/businessareas/16/applications/1", "@rel": "update" }, { "@href": "http://localhost:8080/translator-web/businessareas/16/applications/1/products", "@rel": "products" }, { "@href": "http://localhost:8080/translator-web/businessareas/16", "@rel": "parent", "@title": "", "@type": "" } ] }, "messages": null, "applDesc": "test", "applicationId": "1", "applicationName": "test", "businessArea": { "createTs": "2013-04-08T14:08:21.075-05:00", "createUserid": "test", "lastChangeTs": "2013-04-08T14:08:21.075-05:00", "lastChangeUserid": "test", "version": "120", "links": null, "messages": null, "businessAreaDesc": "WebTest", "businessAreaId": "16", "businessAreaName": "logistics" }, "businessAreaId": "16" } }, "totalMatchingApplications": "16" }