Note that there are some explanatory texts on larger screens.

plurals
  1. POyui datatable error
    text
    copied!<p>I have a problem with json data insertion in my DataTable. Here an example of json data send by server:</p> <pre><code>{"geneItemList":"{"col":"symbol","qv":"cd4","limit":"-1","start":"0","geneid":"920","name":"CD4" ,"symbol":"CD4","lastupdated":"2009-05-20 10:01:52.0","lastmodified":"2009-05-20 11:12:37.0"} ,... </code></pre> <p>And here my YUI code: </p> <pre><code> &lt;script type="text/javascript"&gt; YAHOO.namespace("local"); var qct = YAHOO.local; YAHOO.util.Event.addListener(window, "load", function() { qct.RowSelection = function() { var myColumnDefs = [ {key:"geneid", label:"Gene", formatter: "number", sortable:true}, {key:"name", label:"Name", sortable:true}, {key:"symbol", label:"Symbol", sortable:true}, {key:"lastupdated", label:"Last Updated", formatter:"date", sortable:true}, {key:"lastmodified", label:"Last Modified", formatter:"date", sortable:true} ]; var myDataSource = new YAHOO.util.DataSource("qct-list.html"); myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; myDataSource.connXhrMode = "queueRequests"; myDataSource.responseSchema = { resultsList: "geneItemList", fields: [{key:"col", parser:"string"}, {key:"qv", parser:"string"}, {key:"limit", parser:"number"}, {key:"start", parser:"number"}, {key:"geneid", parser:"number"}, {key:"name", parser:"string"}, {key:"symbol", parser:"string"}, {key:"lastupdated", parser:"date"}, {key:"lastmodified", parser:"date"}] }; // test this var myGeneListTable = new YAHOO.widget.DataTable("geneListTable", myColumnDefs, myDataSource, {initialRequest:"?col=&lt;c:out value="${fieldName}"/&gt;&amp;qv=&lt;c:out value="${queryValue}"/&gt;&amp;start=&lt;c:out value="${start}"/&gt;&amp;limit=&lt;c:out value="${limit}"/&gt;", selectionMode:"single"}); etc... </code></pre> <p>When I test my page, I have "Data error." in my datatable!</p> <p>An idea what is wrong?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload