<?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='sfselectit6566' value='Select Code' data-codeid='sfcode6566' /></p>
<div class='sfcode' id='sfcode6566'>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='sfselectit9804' value='Select Code' data-codeid='sfcode9804' /></p>
<div class='sfcode' id='sfcode9804'>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='sfselectit4593' value='Select Code' data-codeid='sfcode4593' /></p>
<div class='sfcode' id='sfcode4593'>jQuery(&#34;#carTable&#34;).jqGrid({</div>
<p><input type='button' class='sfcodeselect' name='sfselectit8296' value='Select Code' data-codeid='sfcode8296' /></p>
<div class='sfcode' id='sfcode8296'>datatype: &#34;clientSide&#34;,</div>
<p><input type='button' class='sfcodeselect' name='sfselectit9713' value='Select Code' data-codeid='sfcode9713' /></p>
<div class='sfcode' id='sfcode9713'>height: 500,</div>
<p><input type='button' class='sfcodeselect' name='sfselectit7690' value='Select Code' data-codeid='sfcode7690' /></p>
<div class='sfcode' id='sfcode7690'>colNames:[&#39;Name&#39;,&#39;Type&#39;],</div>
<p><input type='button' class='sfcodeselect' name='sfselectit7576' value='Select Code' data-codeid='sfcode7576' /></p>
<div class='sfcode' id='sfcode7576'>colModel:[{name:&#39;name&#39;,index:&#39;name&#39;, width:200, sorttype:&#34;string&#34;},</div>
<p><input type='button' class='sfcodeselect' name='sfselectit2077' value='Select Code' data-codeid='sfcode2077' /></p>
<div class='sfcode' id='sfcode2077'>{name:&#39;type&#39;,index:&#39;type&#39;, width:50, sorttype:&#34;string&#34;},],</div>
<p><input type='button' class='sfcodeselect' name='sfselectit6097' value='Select Code' data-codeid='sfcode6097' /></p>
<div class='sfcode' id='sfcode6097'>pager: jQuery(&#39;#campTablePager&#39;),c</div>
<p><input type='button' class='sfcodeselect' name='sfselectit1608' value='Select Code' data-codeid='sfcode1608' /></p>
<div class='sfcode' id='sfcode1608'>aption: &#34;Car List&#34; });</div>
<p><input type='button' class='sfcodeselect' name='sfselectit3442' value='Select Code' data-codeid='sfcode3442' /></p>
<div class='sfcode' id='sfcode3442'>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>