<?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: fill jqgrid with java object list</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/fill-jqgrid-with-java-object-list</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/fill-jqgrid-with-java-object-list/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>yellowduckbear on fill jqgrid with java object list</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/fill-jqgrid-with-java-object-list#p24350</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/fill-jqgrid-with-java-object-list#p24350</guid>
        	        	<description><![CDATA[<p>I have the follow</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9576' value='Select Code' data-codeid='sfcode9576' /></p>
<div class='sfcode' id='sfcode9576'>public class Car {<br /> private Long id;<br /> private String owner;<br /> private CarEnums type;</p>
<p> public Car(Long id, String owner, CarEnums type){<br /> this.id = id;<br /> this.owner = owner;<br /> this.type = type;<br /> }</p>
<p> public void setId(Long id) {<br /> this.id = id;<br /> }</p>
<p> public Long getId() {<br /> return id;<br /> }</p>
<p> public String getOwner() {<br /> return owner;<br /> }</p>
<p> public void setOwner(String owner) {<br /> this.owner = owner;<br /> }</p>
<p> public void setType(CarEnums type) {<br /> this.type = type;<br /> }<br /> public CarEnums getType() {<br /> return type;<br /> } </p>
<p> }</p>
</div>
<p>I fill an ArrayList of car in CarList.java</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1940' value='Select Code' data-codeid='sfcode1940' /></p>
<div class='sfcode' id='sfcode1940'>carList.add(new Car(1L, &#34;KiT&#34;, CarEnums.JAGUAR)); <br /> carList.add(new Car(2L, &#34;KoT&#34;, CarEnums.JAGUAR)); <br /> carList.add(new Car(3L, &#34;KiT&#34;, CarEnums.RENAULT))</div>
</p>
<p>I made carlist.jsp. I wanna use carList in this jsp to fill JQGrid with data.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1385' value='Select Code' data-codeid='sfcode1385' /></p>
<div class='sfcode' id='sfcode1385'>jQuery(&#34;#carTable&#34;).jqGrid({</div>
<p><input type='button' class='sfcodeselect' name='sfselectit9864' value='Select Code' data-codeid='sfcode9864' /></p>
<div class='sfcode' id='sfcode9864'>datatype: &#34;clientSide&#34;,</div>
<p><input type='button' class='sfcodeselect' name='sfselectit6605' value='Select Code' data-codeid='sfcode6605' /></p>
<div class='sfcode' id='sfcode6605'>height: 500,</div>
<p><input type='button' class='sfcodeselect' name='sfselectit1811' value='Select Code' data-codeid='sfcode1811' /></p>
<div class='sfcode' id='sfcode1811'>colNames:[&#39;Name&#39;,&#39;Type&#39;],</div>
<p><input type='button' class='sfcodeselect' name='sfselectit2982' value='Select Code' data-codeid='sfcode2982' /></p>
<div class='sfcode' id='sfcode2982'>colModel:[{name:&#39;name&#39;,index:&#39;name&#39;, width:200, sorttype:&#34;string&#34;},</div>
<p><input type='button' class='sfcodeselect' name='sfselectit9274' value='Select Code' data-codeid='sfcode9274' /></p>
<div class='sfcode' id='sfcode9274'>{name:&#39;type&#39;,index:&#39;type&#39;, width:50, sorttype:&#34;string&#34;},],</div>
<p><input type='button' class='sfcodeselect' name='sfselectit5798' value='Select Code' data-codeid='sfcode5798' /></p>
<div class='sfcode' id='sfcode5798'>pager: jQuery(&#39;#campTablePager&#39;),c</div>
<p><input type='button' class='sfcodeselect' name='sfselectit2947' value='Select Code' data-codeid='sfcode2947' /></p>
<div class='sfcode' id='sfcode2947'>aption: &#34;Car List&#34; });</div>
<p><input type='button' class='sfcodeselect' name='sfselectit6905' value='Select Code' data-codeid='sfcode6905' /></p>
<div class='sfcode' id='sfcode6905'>jQuery(&#34;#carTable&#34;).addRowData(1, {id: 1, name:carList[1].name() , type:carList[1].type});</div>
<p>How can I use carList java&#160;<a class="api" title="Java API" href="http://download.oracle.com/javase/6/docs/api/java/util/ArrayList.html" target="_new" target="_blank">ArrayList</a>? For example how can I read carList[i].name(), carList[i].type().ToString() in for cycle?&#160;</p>
<p>Thanks&#160;<br />KiT&#160;<img src="http://www.coderanch.com/images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" alt="" /></p>
]]></description>
        	        	<pubDate>Fri, 19 Aug 2011 16:19:29 +0300</pubDate>
        </item>
</channel>
</rss>