<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: jqgrid jsp - only grid displayed no data </title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>spsmysp on jqgrid jsp - only grid displayed no data </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p21301</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p21301</guid>
        	        	<description><![CDATA[<p>I had this problem too. Actually, I read this page tried and tried again. But could not get the data shown in json format.</p>
<p>Finally, I found this page:<a href="http://www.comanswer.com/question/jqgrid-with-json-data-renders-table-as-empty" rel="nofollow" target="_blank"><a href="http://www.comanswer.com/quest" rel="nofollow">http://www.comanswer.com/quest</a>.....e-as-empty</a>.</p>
<p>The reason that the data can not be shown is that our json format is not strict enough.</p>
<p>reference here: <a rel="nofollow" href="http://simonwillison.net/2006/Oct/11/json/" target="_blank"></a><a href="http://simonwillison.net/2006/" rel="nofollow" target="_blank">http://simonwillison.net/2006/</a>.....t/11/json/</p>
<p>{page: &#39;1&#39;, records: &#39;6&#39;, rows: [{cell:[&#39;X-RAY&#39;, &#39;46190&#39;, &#39;1144&#39;, &#39;2127&#39;, &#39;17&#39;, &#39;49479&#39;], id: &#39;1&#39;},{cell:[&#39;NMR&#39;, &#39;6846&#39;, &#39;849&#39;, &#39;146&#39;, &#39;6&#39;, &#39;7847&#39;], id: &#39;2&#39;},{cell:[&#39;ELECTRON MICROSCOPY&#39;, &#39;165&#39;, &#39;16&#39;, &#39;59&#39;, &#39;0&#39;, &#39;240&#39;], id: &#39;3&#39;},{cell:[&#39;HYBRID&#39;, &#39;13&#39;, &#39;1&#39;, &#39;1&#39;, &#39;1&#39;, &#39;16&#39;], id: &#39;4&#39;},{cell:[&#39;other&#39;, &#39;108&#39;, &#39;4&#39;, &#39;4&#39;, &#39;9&#39;, &#39;125&#39;], id: &#39;5&#39;},{cell:[&#39;Total&#39;, &#39;53322&#39;, &#39;2014&#39;, &#39;2337&#39;, &#39;33&#39;, &#39;57707&#39;], id: &#39;6&#39;}],total: &#39;1&#39;}</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;&#62;</p>
<p>{"page": "1&#8243;," records": "6&#8243;,"rows": [{"cell":["X-RAY", "46190", "1144", "2127", "17", "49479"],"id": "1&#8243;},{"cell":["NMR", "6846", "849", "146", "6", "7847"],"id": "2&#8243;},{"cell":["ELECTRON MICROSCOPY", "165", "16", "59", "0", "240"],"id": "3&#8243;},{"cell":["HYBRID", "13", "1", "1", "1", "16"], "id": "4&#8243;},{"cell":["other", "108", "4", "4", "9", "125"],"id": "5&#8243;},{"cell":["Total", "53322", "2014", "2337", "33", "57707"],"id": "6&#8243;}],"total": "1&#8243;}</p>
<p>maybe, you should replace the <span style="color: #ff0000;">"</span> by<span style="color: #ff0000;"> \</span><span style="color: #ff0000;"><span style="color: #ff0000;">"</span> <span style="color: #000000;">if you place the string above between the</span> " "</span></p>
<p><span style="color: #000000;">PS: I am sorry for some grammer error, my english is pool. Thanks!</span></p>
]]></description>
        	        	<pubDate>Wed, 15 Dec 2010 16:19:26 +0200</pubDate>
        </item>
        <item>
        	<title>betty on jqgrid jsp - only grid displayed no data </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7543</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7543</guid>
        	        	<description><![CDATA[<p>Finally, I got the xml data from server side jsp page rendered in grid. 🙂</p>
</p>
<p>My solution is to add these two links to ensure the response data in xml format.</p>
<p>&#60;%</p>
<p>response.setContentType("text/xml");</p>
<p>response.setCharacterEncoding("UTF-8");</p>
<p>%&#62;</p>
]]></description>
        	        	<pubDate>Mon, 29 Jun 2009 18:54:00 +0300</pubDate>
        </item>
        <item>
        	<title>tony on jqgrid jsp - only grid displayed no data </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7507</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7507</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Using fireBug check the server response.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 27 Jun 2009 11:26:02 +0300</pubDate>
        </item>
        <item>
        	<title>betty on jqgrid jsp - only grid displayed no data </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7459</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7459</guid>
        	        	<description><![CDATA[<p>Hi Burt,</p>
<p>Thanks for the suggestions. Indeed there are some problems about my json string (though it was generated by flexjson and it was valid). I corrected it and put it in the javascript in html, the json string data rended in grid succefully. But I still could not loaded the same json string if it was produced from jsp page.</p>
<p>So here is my test.</p>
<p>I copied the json string generated by <a href="http://localhost:8080/examples/holdingsJSONData.jsp" rel="nofollow" target="_blank"><a href="http://localhost:8080/examples" rel="nofollow">http://localhost:8080/examples</a>.....ONData.jsp</a> to jsonGrid4.html. jsonGrid4.html can display the data well. And following is the source.</p>
<p>&#60;html&#62;<br />&#60;head&#62; &#60;title&#62;jqGrid Demo&#60;/title&#62;<br />&#60;link rel="stylesheet" type="text/css" media="screen" href="/pdb/skins/web20/jqGrid/themes/sand/grid.css" /&#62;<br />&#60;link rel="stylesheet" type="text/css" media="screen" href="/pdb/kins/web20/jqGrid/themes/jqModal.css" /&#62;<br />&#60;link href="/pdb/skins/web20/styles/main.css" rel="stylesheet" type="text/css" /&#62;<br />&#60;link href="/pdb/skins/web20/styles/slimbox2.css" rel="stylesheet" type="text/css" /&#62;</p>
<p>&#60;script src="/pdb/skins/web20/jqGrid/jquery.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script src="/pdb/skins/web20/jqGrid/jquery.jqGrid.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script src="/pdb/skins/web20/jqGrid/js/jqModal.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script src="/pdb/skins/web20/jqGrid/js/jqDnR.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script type="text/javascript"&#62;</p>
<p>// generated by holdingsJSONData.jsp and copied here</p>
<p>var mystr = "{page: &#39;1&#39;, records: &#39;6&#39;, rows: [{cell:[&#39;X-RAY&#39;, &#39;46190&#39;, &#39;1144&#39;, &#39;2127&#39;, &#39;17&#39;, &#39;49479&#39;], id: &#39;1&#39;},{cell:[&#39;NMR&#39;, &#39;6846&#39;, &#39;849&#39;, &#39;146&#39;, &#39;6&#39;, &#39;7847&#39;], id: &#39;2&#39;},{cell:[&#39;ELECTRON MICROSCOPY&#39;, &#39;165&#39;, &#39;16&#39;, &#39;59&#39;, &#39;0&#39;, &#39;240&#39;], id: &#39;3&#39;},{cell:[&#39;HYBRID&#39;, &#39;13&#39;, &#39;1&#39;, &#39;1&#39;, &#39;1&#39;, &#39;16&#39;], id: &#39;4&#39;},{cell:[&#39;other&#39;, &#39;108&#39;, &#39;4&#39;, &#39;4&#39;, &#39;9&#39;, &#39;125&#39;], id: &#39;5&#39;},{cell:[&#39;Total&#39;, &#39;53322&#39;, &#39;2014&#39;, &#39;2337&#39;, &#39;33&#39;, &#39;57707&#39;], id: &#39;6&#39;}],total: &#39;1&#39;}";</p>
<p>&#160;&#160;&#160; jQuery(document).ready(function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#list").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;jsonstring&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datastr: mystr,</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;Exp.Method&#39;, &#39;Proteins&#39;, &#39;Nucleic Acids&#39;, &#39;Protein/NA Complexes&#39;, &#39;Other&#39;, &#39;Total&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel :[ {name:&#39;em&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;proteins&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;nucleic&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;complexes&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;other&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;total&#39;} ],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: jQuery(&#39;#pager&#39;),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;id&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; imgpath: &#39;/pdb/skins/web20/jqGrid/themes/sand/images&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: &#39;Not first JSON grid&#39; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#60;/script&#62;<br />&#60;/head&#62;<br />&#60;body&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;table id="list" class="scroll"&#62;&#60;/table&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;div id="pager" class="scroll" style="text-align:right;"&#62;&#60;/div&#62;<br />&#60;/body&#62;<br />&#60;/html&#62;</p>
</p>
<p>Then I replace the following code</p>
<p>&#160;&#160;&#160; jQuery(document).ready(function(){<br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#list").jqGrid({<br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;jsonstring&#39;,<br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datastr: mystr,</p>
</p>
<p>with</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(document).ready(function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#list").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:&#39;<a href="http://localhost:8080/examples/holdingsJSONData.jsp&#038;#39" rel="nofollow" target="_blank">http://localhost:8080/examples/holdingsJSONData.jsp&#038;#39</a>;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;json&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;POST&#39;,</p>
<p>The data just could not load. I am not sure if any piece is missing? I use out.println(s) in holdingsJSONData.jsp to send the json string to browser.</p>
<p>Appreciate suggestions since I have to get it work.</p>
<p>Betty</p></p>
]]></description>
        	        	<pubDate>Thu, 25 Jun 2009 14:20:49 +0300</pubDate>
        </item>
        <item>
        	<title>bujinwang on jqgrid jsp - only grid displayed no data </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7446</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7446</guid>
        	        	<description><![CDATA[<p>Check in browser whether your <a rel="nofollow" href="http://localhost:8080/examples/holdingsJSONData.jsp" target="_blank"><a href="http://localhost:8080/examples" rel="nofollow">http://localhost:8080/examples</a>.....ONData.jsp</a> returns valid JSON string and your JSON reader setting matches the format. If the string is not valid JSON or does not match the format specified in yoru jsonReader, it quietly does not show any error.</p>
</p>
<p>Burt</p>
]]></description>
        	        	<pubDate>Wed, 24 Jun 2009 17:47:21 +0300</pubDate>
        </item>
        <item>
        	<title>betty on jqgrid jsp - only grid displayed no data </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7445</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-jsp-only-grid-displayed-no-data#p7445</guid>
        	        	<description><![CDATA[<p>I have been able to setup some simple examples using jqgrid loading data. I can display the grid with data succefully by putting xml data and json string in client side script.</p>
<p>Now the problem I am struggling with is using jqGrid to display the data retrieved from JSP (I have to use java since that is all the project based on).</p>
<p>For the jsp page, I can view the generated json string (on browser) or xml data (view page source) by accessing the files directly. The data are in the correct format since the format are same as my previous worked examples.</p>
<p><a href="http://localhost:8080/examples/holdingsJSONData.jsp" rel="nofollow" target="_blank"><a href="http://localhost:8080/examples" rel="nofollow">http://localhost:8080/examples</a>.....ONData.jsp</a></p>
<p><a href="http://localhost:8080/examples/holdingsData.jsp" rel="nofollow" target="_blank"><a href="http://localhost:8080/examples" rel="nofollow">http://localhost:8080/examples</a>.....gsData.jsp</a></p>
</p>
<p>But when I specified the url as either one above in the html, only the grid displayed without data.</p>
<p><a href="http://localhost:8080/examples/gridDemo.html" rel="nofollow" target="_blank"><a href="http://localhost:8080/examples" rel="nofollow">http://localhost:8080/examples</a>.....dDemo.html</a></p>
<p>&#60;script type="text/javascript"&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(document).ready(function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#list").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:&#39;holdingsJSONData.jsp&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;json&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;POST&#39;,<br />.....</p>
</p>
<p>Any thoughts are appeciated. Regards.</p>
<p>Betty</p></p>
]]></description>
        	        	<pubDate>Wed, 24 Jun 2009 14:17:55 +0300</pubDate>
        </item>
</channel>
</rss>