<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CakePHP: Sortable AJAX Drag &amp; Drops &#8211; The Basics</title>
	<atom:link href="http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/</link>
	<description>Dustin Weber's Take On Web Development &#038; Other Random Diversions.</description>
	<lastBuildDate>Tue, 20 Sep 2011 03:40:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Stuart Palmer</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-970</link>
		<dc:creator>Stuart Palmer</dc:creator>
		<pubDate>Tue, 02 Nov 2010 17:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-970</guid>
		<description>Has anyone got this working in Cake 1.3? I have been trying but get this error message:

Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#039;findAll&#039; at line 1 [CORE/cake/libs/model/datasources/dbo_source.php

I am wondering if the findAll command has been depreciated or something?

Thanks</description>
		<content:encoded><![CDATA[<p>Has anyone got this working in Cake 1.3? I have been trying but get this error message:</p>
<p>Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;findAll&#8217; at line 1 [CORE/cake/libs/model/datasources/dbo_source.php</p>
<p>I am wondering if the findAll command has been depreciated or something?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: varun prakash</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-948</link>
		<dc:creator>varun prakash</dc:creator>
		<pubDate>Thu, 12 Aug 2010 05:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-948</guid>
		<description>hardly i need a completed example with demo since i am  a new-bee  to cakephp i wanna finish this task send me soon thanks in advance</description>
		<content:encoded><![CDATA[<p>hardly i need a completed example with demo since i am  a new-bee  to cakephp i wanna finish this task send me soon thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felix</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-826</link>
		<dc:creator>Felix</dc:creator>
		<pubDate>Tue, 17 Nov 2009 19:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-826</guid>
		<description>Hi, I have exactly the same problem as ray, everything appears to be working but the order function just doesn&#039;t get called.

Can any one suggest what the problem could be?

Thanks,
Felix</description>
		<content:encoded><![CDATA[<p>Hi, I have exactly the same problem as ray, everything appears to be working but the order function just doesn&#8217;t get called.</p>
<p>Can any one suggest what the problem could be?</p>
<p>Thanks,<br />
Felix</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ray</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-768</link>
		<dc:creator>ray</dc:creator>
		<pubDate>Fri, 27 Mar 2009 05:58:15 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-768</guid>
		<description>i need some help...

my function order() is not getting called...so the drag and drop is working but not getting saved....

here is my code in the view:

sortable(&#039;widgets&#039;, array(&#039;url&#039;=&gt;&#039;order&#039;, &#039;before&#039;=&gt;&quot;Element.hide(&#039;status&#039;);&quot;, &#039;complete&#039;=&gt;&quot;Element.show(&#039;status&#039;);&quot;)); ?&gt;


set(&#039;status&#039;, &#039;Artist Ordering Succesfully Saved!&#039;);

//assign widgets to view sorted by the &#039;order&#039; field
$this-&gt;set(&#039;widgets&#039;, $this-&gt;Widget-&gt;findAll(null,null,&#039;order&#039;,null,null));


/** Receives ajax request from index **/

}// end of index

function order()
{

//loop through the data sent via the ajax call
foreach ($this-&gt;params[&#039;form&#039;][&#039;widgets&#039;] as $order =&gt; $id)
{
$data[&#039;Widget&#039;][&#039;order&#039;] = $order;

$this-&gt;Widget-&gt;id = $id;
$this-&gt;Widget-&gt;saveField(&#039;order&#039;,$order);
//we have success!

} // foreach loop

} // end of function order



}</description>
		<content:encoded><![CDATA[<p>i need some help&#8230;</p>
<p>my function order() is not getting called&#8230;so the drag and drop is working but not getting saved&#8230;.</p>
<p>here is my code in the view:</p>
<p>sortable(&#8216;widgets&#8217;, array(&#8216;url&#8217;=&gt;&#8217;order&#8217;, &#8216;before&#8217;=&gt;&#8221;Element.hide(&#8216;status&#8217;);&#8221;, &#8216;complete&#8217;=&gt;&#8221;Element.show(&#8216;status&#8217;);&#8221;)); ?&gt;</p>
<p>set(&#8216;status&#8217;, &#8216;Artist Ordering Succesfully Saved!&#8217;);</p>
<p>//assign widgets to view sorted by the &#8216;order&#8217; field<br />
$this-&gt;set(&#8216;widgets&#8217;, $this-&gt;Widget-&gt;findAll(null,null,&#8217;order&#8217;,null,null));</p>
<p>/** Receives ajax request from index **/</p>
<p>}// end of index</p>
<p>function order()<br />
{</p>
<p>//loop through the data sent via the ajax call<br />
foreach ($this-&gt;params['form']['widgets'] as $order =&gt; $id)<br />
{<br />
$data['Widget']['order'] = $order;</p>
<p>$this-&gt;Widget-&gt;id = $id;<br />
$this-&gt;Widget-&gt;saveField(&#8216;order&#8217;,$order);<br />
//we have success!</p>
<p>} // foreach loop</p>
<p>} // end of function order</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ray</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-767</link>
		<dc:creator>ray</dc:creator>
		<pubDate>Fri, 27 Mar 2009 01:35:38 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-767</guid>
		<description>hi,

i have the drag and drop sorting working but its not saving the order.

in firebug this is what is coming up in the post

widgets[] 2
widgets[] 3

for some reason the ID is coming up empty.. can someone help me?

i have checked the code many times....no idea what the problem could be...</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>i have the drag and drop sorting working but its not saving the order.</p>
<p>in firebug this is what is coming up in the post</p>
<p>widgets[] 2<br />
widgets[] 3</p>
<p>for some reason the ID is coming up empty.. can someone help me?</p>
<p>i have checked the code many times&#8230;.no idea what the problem could be&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomas Kupka</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-760</link>
		<dc:creator>Tomas Kupka</dc:creator>
		<pubDate>Tue, 10 Mar 2009 17:16:25 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-760</guid>
		<description>Thanks, it works great!! with cake 1.2</description>
		<content:encoded><![CDATA[<p>Thanks, it works great!! with cake 1.2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-751</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 06 Feb 2009 18:08:38 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-751</guid>
		<description>I couldn&#039;t get this to work at first; I got a &quot;Sortable not defined&quot; javascript error, because as is, this code causes the script tags for scriptaculous and prototype to appear AFTER the document head.

I got it to work by simply adding &quot;,false&quot; at the end of the $javascript-&gt;link statements, like this;

if (isset($javascript)) {
echo $javascript-&gt;link(’scriptaculous/lib/prototype.js’, false);
echo $javascript-&gt;link(’scriptaculous/src/scriptaculous.js’, false);
}


works fine now.

Cheers!

Loren</description>
		<content:encoded><![CDATA[<p>I couldn&#8217;t get this to work at first; I got a &#8220;Sortable not defined&#8221; javascript error, because as is, this code causes the script tags for scriptaculous and prototype to appear AFTER the document head.</p>
<p>I got it to work by simply adding &#8220;,false&#8221; at the end of the $javascript-&gt;link statements, like this;</p>
<p>if (isset($javascript)) {<br />
echo $javascript-&gt;link(’scriptaculous/lib/prototype.js’, false);<br />
echo $javascript-&gt;link(’scriptaculous/src/scriptaculous.js’, false);<br />
}</p>
<p>works fine now.</p>
<p>Cheers!</p>
<p>Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastien Galarneau</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-717</link>
		<dc:creator>Sebastien Galarneau</dc:creator>
		<pubDate>Wed, 05 Nov 2008 20:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-717</guid>
		<description>Wow very nice code...
But i wanted the order to be the same when i came back on the page... ??!

thks a lot</description>
		<content:encoded><![CDATA[<p>Wow very nice code&#8230;<br />
But i wanted the order to be the same when i came back on the page&#8230; ??!</p>
<p>thks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin Weber</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-618</link>
		<dc:creator>Dustin Weber</dc:creator>
		<pubDate>Fri, 08 Aug 2008 16:16:08 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-618</guid>
		<description>Yeah, now that I looked at the code; it actually seems like there isn&#039;t anything deprecated in there after all.  Isn&#039;t that nice?!</description>
		<content:encoded><![CDATA[<p>Yeah, now that I looked at the code; it actually seems like there isn&#8217;t anything deprecated in there after all.  Isn&#8217;t that nice?!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brooks</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-616</link>
		<dc:creator>brooks</dc:creator>
		<pubDate>Fri, 08 Aug 2008 13:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-616</guid>
		<description>Excellent.  Dustin, I&#039;m using 1.2 and it seems you&#039;ve either updated the code or something, but it works great.

Thanks for helping the new guy (me)!</description>
		<content:encoded><![CDATA[<p>Excellent.  Dustin, I&#8217;m using 1.2 and it seems you&#8217;ve either updated the code or something, but it works great.</p>
<p>Thanks for helping the new guy (me)!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin Weber</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-606</link>
		<dc:creator>Dustin Weber</dc:creator>
		<pubDate>Thu, 07 Aug 2008 20:46:24 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-606</guid>
		<description>EVERYONE

This post is very old and probably unusable at this point.  CakePHP has changed immensely since I wrote this.  I would recommend you learn version 1.2 at this point (it is in RC2) and you&#039;ll have a much easier go of it!

Thanks,

Dustin Weber</description>
		<content:encoded><![CDATA[<p>EVERYONE</p>
<p>This post is very old and probably unusable at this point.  CakePHP has changed immensely since I wrote this.  I would recommend you learn version 1.2 at this point (it is in RC2) and you&#8217;ll have a much easier go of it!</p>
<p>Thanks,</p>
<p>Dustin Weber</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-602</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Wed, 06 Aug 2008 13:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-602</guid>
		<description>Nice tutorial, thanks.

I was scratching my head for a bit because I copied some elements of your code which then didn&#039;t work - for anyone having the same issue it is because the single and double quotes were not rendering as &#039;normal&#039; quotes inside my editor and so the strings were breaking. This is on FF3/Mac, don&#039;t know if the same is true of other browsers/OSs</description>
		<content:encoded><![CDATA[<p>Nice tutorial, thanks.</p>
<p>I was scratching my head for a bit because I copied some elements of your code which then didn&#8217;t work &#8211; for anyone having the same issue it is because the single and double quotes were not rendering as &#8216;normal&#8217; quotes inside my editor and so the strings were breaking. This is on FF3/Mac, don&#8217;t know if the same is true of other browsers/OSs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Perkster</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-593</link>
		<dc:creator>Perkster</dc:creator>
		<pubDate>Tue, 15 Jul 2008 06:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-593</guid>
		<description>You rock!  Thanks for a great easy to learn article.</description>
		<content:encoded><![CDATA[<p>You rock!  Thanks for a great easy to learn article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yogeshs</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-578</link>
		<dc:creator>Yogeshs</dc:creator>
		<pubDate>Mon, 02 Jun 2008 15:28:32 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-578</guid>
		<description>Its nice tutorial and working fine for me.
As I m knew to cakephp so I would like to know if I have to show data in Field 1Field 2Field 3
How do apply this drag n drop sorting here above.
Please reply asap ..I need it urgently :( 
Thanks in advance ..</description>
		<content:encoded><![CDATA[<p>Its nice tutorial and working fine for me.<br />
As I m knew to cakephp so I would like to know if I have to show data in Field 1Field 2Field 3<br />
How do apply this drag n drop sorting here above.<br />
Please reply asap ..I need it urgently <img src='http://www.dustinweber.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
Thanks in advance ..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://www.dustinweber.com/main-page/cakephp-sortable-ajax-drag-drops-the-basics/comment-page-1/#comment-573</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Sat, 24 May 2008 00:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://dustinweber.com/?p=1263#comment-573</guid>
		<description>Thanks a lot!! I&#039;m a rookie in CakePHP, downloaded it first time yesterday. Yet I managed to follow your helpful tutorial and make it work :-)

I just had one problem; WP tweaks the output of single and double quotes, so I had to debug some PHP errors before I got it up. Lazy me didn&#039;t read the code thoroughly enough before paste - save - load page... :-)</description>
		<content:encoded><![CDATA[<p>Thanks a lot!! I&#8217;m a rookie in CakePHP, downloaded it first time yesterday. Yet I managed to follow your helpful tutorial and make it work <img src='http://www.dustinweber.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I just had one problem; WP tweaks the output of single and double quotes, so I had to debug some PHP errors before I got it up. Lazy me didn&#8217;t read the code thoroughly enough before paste &#8211; save &#8211; load page&#8230; <img src='http://www.dustinweber.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

