<?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 not being populated with JSON data from Java Servlet</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-not-being-populated-with-json-data-from-java-servlet</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-not-being-populated-with-json-data-from-java-servlet/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>yellowduckbear on jqGrid not being populated with JSON data from Java Servlet</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-not-being-populated-with-json-data-from-java-servlet#p25368</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-not-being-populated-with-json-data-from-java-servlet#p25368</guid>
        	        	<description><![CDATA[</p>
<p>I&#39;Hi!</p>
</p>
<p>In jqGrid:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7875' value='Select Code' data-codeid='sfcode7875' /></p>
<div class='sfcode' id='sfcode7875'>
<p>jQuery(&#34;#campTimetable&#34;).jqGrid({</p>
<p>url:&#39;/admin/getTimetable&#39;,</p>
<p>datatype: &#39;json&#39;,</p>
<p>...</p>
</div>
<p>In JavaServlet:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1606' value='Select Code' data-codeid='sfcode1606' /></p>
<div class='sfcode' id='sfcode1606'>
<p>protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {</p>
<p>// TODO Auto-generated method stub</p>
<p>logger.info(&#34;TimetableServlet doGet&#34;);</p>
</p>
<p>HttpSession session = request.getSession(true);</p>
</p>
<p>try</p>
<p>{</p>
</p>
<p>timetableList = getListFromSomeWhere ...</p>
</p>
<p>JSONObject responcedata=new JSONObject();</p>
<p>net.sf.json.JSONArray cell=new net.sf.json.JSONArray();</p>
<p>net.sf.json.JSONArray cellarray=new net.sf.json.JSONArray();</p>
<p>net.sf.json.JSONObject cellobj=new net.sf.json.JSONObject();</p>
</p>
<p>responcedata.put(&#34;page&#34;, Long.parseLong(&#34;1&#34;));</p>
<p>Iterator&#60;Timetable&#62; itr = timetableList.iterator();</p>
<p>while(itr.hasNext()){</p>
<p>Timetable t = itr.next();</p>
<p>cellobj.put(&#34;id&#34;, t.getId());</p>
<p>cell.add(t.field0().toString());</p>
<p>cell.add( StringUtil.StringToTime( t.field1()));</p>
<p>cell.add( StringUtil.StringToTime( t.field2()));</p>
<p>cellobj.put(&#34;cell&#34;, cell);</p>
<p>cell.clear();</p>
<p>cellarray.add(cellobj);</p>
<p>}</p>
<p>responcedata.put(&#34;rows&#34;, cellarray);</p>
<p>response.setContentType(&#34;applisation/json&#34;);</p>
<p>PrintWriter out = response.getWriter();</p>
<p>out.print(responcedata);</p>
<p>out.flush();</p>
<p>}</p>
<p>catch(Exception e)</p>
<p>{</p>
<p>logger.error(&#34;Error TimetableServlet goGet: &#34; + e.toString());</p>
<p>}</p>
<p>}</p>
</div>
<p>It&#39;s work for me.</p>
</p>
<p>KiT</p>
]]></description>
        	        	<pubDate>Mon, 12 Dec 2011 16:55:42 +0200</pubDate>
        </item>
        <item>
        	<title>adrnola on jqGrid not being populated with JSON data from Java Servlet</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-not-being-populated-with-json-data-from-java-servlet#p25358</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-not-being-populated-with-json-data-from-java-servlet#p25358</guid>
        	        	<description><![CDATA[</p>
<p>Hi All -</p>
</p>
<p>I&#39;m new to jqGrid. Maybe someone can help me out ? I posted a full description of the problem at Stackoverflow. So rather than repeating problem all over again, I have posted the link here:</p>
</p>
<p>jqGrid not being populated with JSON data from Java Servlet:</p>
<p><a rel="nofollow" href="http://stackoverflow.com/questions/8445171/jqgrid-not-being-populated-with-json-data-from-java-servlet" target="_blank"></a><a href="http://stackoverflow.com/quest" rel="nofollow" target="_blank">http://stackoverflow.com/quest</a>.....va-servlet</p>
</p>
<p><a href="http://tinypic.com/r/acrgus/5" rel="nofollow" target="_blank">http://tinypic.com/r/acrgus/5</a></p>
<p>Any help appreciated.</p>
<p>Thanks in advance.</p>
]]></description>
        	        	<pubDate>Fri, 09 Dec 2011 14:39:34 +0200</pubDate>
        </item>
</channel>
</rss>