<?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: Receiving respose</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose</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/receiving-respose/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>YamilBracho on Receiving respose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2333</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2333</guid>
        	        	<description><![CDATA[<p>Thank&#39;s a lot, Tony. The final version is :</p>
<p>&#160;afterSubmit: function(serverStatus, aPostData) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var jsonText = serverStatus.responseText;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var objStatus = eval(&#39;(&#39; + jsonText + &#39;)&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (objStatus.status == &#39;false&#39;) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [false, objStatus.message, ""];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [true, "", ""];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } <br />&#160; }</p>
]]></description>
        	        	<pubDate>Mon, 06 Oct 2008 10:54:18 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Receiving respose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2324</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2324</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>As I explain in my previous post the <strong>afterSubmit function should return</strong></p>
<p><strong>certain values</strong>. Just try this</p>
<p>afterSubmit: function(serverStatus, aPostData) {<br />&#160; var respuesta = serverStatus.responseText;<br />&#160; return [false,respuesta,""];<br />}</p>
]]></description>
        	        	<pubDate>Sun, 05 Oct 2008 10:54:35 +0300</pubDate>
        </item>
        <item>
        	<title>YamilBracho on Receiving respose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2317</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2317</guid>
        	        	<description><![CDATA[<p>Thanks Tony</p>
<p>My javascript code is:</p>
<p>afterSubmit: function(serverStatus, aPostData) {<br />&#160; var respuesta = serverStatus.responseText;<br />&#160; alert(respuesta);<br />}</p>
<p>But the error is shown after the alert().</p>
<p>The error is in grid.formedit-min.js</p>
]]></description>
        	        	<pubDate>Fri, 03 Oct 2008 12:54:34 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Receiving respose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2313</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2313</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You should not compare this way</p>
<p>if(ret[0]==false) since this is internal array instead use this</p>
<p>afterSubmit: function(serverStatus, aPostData){</p>
<p>var respuesta = serverStatus.responseText;</p>
<p>var mydata = eval("("+respuesta+")") ;</p>
<p>if (mydata[status] == false) { // or mybe mydata[status] == &#39;false&#39;</p>
<p>...</p>
<p>return [false,mydata[message],""];</p>
<p>else { return [true,"",""]; }</p>
<p>}</p>
]]></description>
        	        	<pubDate>Fri, 03 Oct 2008 11:47:40 +0300</pubDate>
        </item>
        <item>
        	<title>YamilBracho on Receiving respose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2312</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2312</guid>
        	        	<description><![CDATA[<p>Now I am returning [false,"Banco ya existe",""]</p>
<p>But still got the same error message:</p>
<p>ret is undefined<br />complete()()grid.for...it-min.js (line 18)<br />complete()jquery-1....6.min.js (line 29)<br />handleError()()jquery-1....6.min.js (line 29)<br />[Break on this error] if(ret[0]==false){$("#FormError&#62;td","#"+...erEdit)$($t).setSelection(postdata.id);}</p>
<p>I think that the error is what I need to pass something in the aPostdata array because I think if the first element in the response it is false, the code needs to show the field with error.</p>
<p>Am I right ? If so, how I pass an array in aPostData ?</p>
]]></description>
        	        	<pubDate>Fri, 03 Oct 2008 10:14:34 +0300</pubDate>
        </item>
        <item>
        	<title>YamilBracho on Receiving respose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2282</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2282</guid>
        	        	<description><![CDATA[<p>Tony, I build my returned string as :</p>
<p>sb.append( "[{status:\\"").append(BooleanUtils.toStringTrueFalse(this.isStatus()));<br />&#160;sb.append("\\", message:\\"").append(this.getMsg().trim());<br />&#160;sb.append("\\"}]");</p>
<p>&#160;try {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; response.setContentType("text/plain");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; PrintWriter out = response.getWriter();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; out.print(sb.toString());<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; out.flush();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; out.close();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; } catch (Exception ex) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ex.printStackTrace();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>It is the same code that i used to return json data to be shown in the grid...</p></p>
]]></description>
        	        	<pubDate>Wed, 01 Oct 2008 07:26:23 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Receiving respose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2273</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2273</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Could you please post your code. This event in all cases should return</p>
<p>a array instead of result - i.e.</p>
<p>if(some condition) {</p>
<p>return [true,"",""];</p>
<p>} else {</p>
<p>return [false,"Message",""]</p>
<p>}</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 01 Oct 2008 03:21:30 +0300</pubDate>
        </item>
        <item>
        	<title>YamilBracho on Receiving respose</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2260</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/receiving-respose#p2260</guid>
        	        	<description><![CDATA[<p>Hi. I am getting some trouble with the response usign atferSubmit event.</p>
<p>I response from my servlet an objectlike</p>
<pre>{ status:"false", message:"Banco ya existe"}<br /><br />My afterSubmit is <br /> afterSubmit: function(serverStatus, aPostData) {<br />      var respuesta = serverStatus.responseText;<br />  }<br /><br />but I am getting an error :<br /><br /><span class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch"><div class="errorTitle">ret is undefined</div><div class="errorSourceBox errorSource-exec">[Image Can Not Be Found]<span class="errorSource">if(ret[0]==false){$("#FormError&#62;td","#"+...erEdit)$($t).setSelection(postdata.id);}<br /><br />Any Help ?</span></div></span></pre>
]]></description>
        	        	<pubDate>Tue, 30 Sep 2008 10:41:43 +0300</pubDate>
        </item>
</channel>
</rss>