<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>ColdFusion RIA</title>
			<link>http://www.coldfusion-ria.com/Blog/index.cfm</link>
			<description>Discovering ColdFusion RIA Developmen</description>
			<language>en-us</language>
			<pubDate>Sat, 19 May 2012 22:25:11 -0500</pubDate>
			<lastBuildDate>Wed, 21 Mar 2012 12:20:00 -0500</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>shahkumar@gmail.com</managingEditor>
			<webMaster>shahkumar@gmail.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>shahkumar@gmail.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>ColdFusion 10 Charting - Funnel Chart and Playing with the Legend</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2012/3/21/ColdFusion-10-Charting--Funnel-Chart-and-Playing-with-the-Legend</link>
				<description>
				
				A blog reader asked on the chart post yesterday about Funnel charts in ColdFusion 10. So, I whipped up a quick demo of the same.

&lt;a href=&quot;http://coldfusionria-cf10beta.securecb1cf10.ezhostingserver.com/CF10/Charting/E2.cfm&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt; (Refresh screen if demo doesn&apos;t load the first time)

You will see that there are two charts. The default render doesn&apos;t show the legend at a good place, and fortunately with ZingChart + CF10 functionality we are able to position it much better by specifying the legend attribute for cfchart.

Let&apos;s look at the code.&lt;codeouter&gt;
&lt;code&gt;
&lt;!--- Get Graph Data ---&gt;
&lt;cfquery name=&quot;selChartData&quot; datasource=&quot;#Application.DataSource#&quot;&gt;
	SELECT
		SUM(Total) As InvTotal,
		Vendor
	FROM
		Invoices
	GROUP BY Vendor
	ORDER BY SUM(Total) DESC
&lt;/cfquery&gt;


&lt;cfscript&gt;
	legend = {
		&quot;x&quot;:0, //Position
		&quot;y&quot;:450, //Position
		&quot;layout&quot;:&quot;2x&quot;, //Change layout to be 2 lines
		&quot;width&quot;:350, //Set width
		&quot;shadow&quot;:true //Show a shadow	
	};
	
	
	background = {
		&quot;background-color&quot;:&quot;##F7F8E0&quot;
	};
	
	
&lt;/cfscript&gt;

&lt;!--- Normal Funnel, no mods ---&gt;
&lt;div style=&quot;width:550px;float:left;&quot;&gt;
&lt;cfchart format=&quot;html&quot; ID=&quot;InvoicesCF10FunnelDefault&quot; title=&quot;Invoices by Vendor&quot; height=&quot;500&quot; width=&quot;500&quot; 
	background=&quot;#background#&quot;&gt;	
	&lt;cfchartseries type=&quot;funnel&quot; query=&quot;selChartData&quot; itemcolumn=&quot;Vendor&quot; valuecolumn=&quot;InvTotal&quot; serieslabel=&quot;Total&quot;
	paintstyle=&quot;plain&quot;&gt;
	&lt;/cfchartseries&gt;		
&lt;/cfchart&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;cfchart format=&quot;html&quot; ID=&quot;InvoicesCF10FunnelChanged&quot; title=&quot;Invoices by Vendor&quot; height=&quot;500&quot; width=&quot;500&quot; 
	background=&quot;#background#&quot; legend=&quot;#legend#&quot;&gt;	
	&lt;cfchartseries type=&quot;funnel&quot; query=&quot;selChartData&quot; itemcolumn=&quot;Vendor&quot; valuecolumn=&quot;InvTotal&quot; serieslabel=&quot;Total&quot;
	paintstyle=&quot;plain&quot;&gt;
	&lt;/cfchartseries&gt;		
&lt;/cfchart&gt;
&lt;/div&gt;
&lt;/code&gt;
&lt;/codeouter&gt;

As you can see, we have a legend sturcture withsome values to specify its behavior. Using this we are able to reposition it, change layout, give some shadow. There are other things you can do, find the full variety of options in the &lt;a href=&quot;http://www.zingchart.com/&quot; target=&quot;_blank&quot;&gt;ZingChart&lt;/a&gt; documentation.
				</description>
				
				<category>ColdFusion</category>
				
				<category>ColdFusion 10</category>
				
				<pubDate>Wed, 21 Mar 2012 12:20:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2012/3/21/ColdFusion-10-Charting--Funnel-Chart-and-Playing-with-the-Legend</guid>
				
				
			</item>
			
			<item>
				<title>ColdFusion 10 Charting - The new stuff</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2012/3/20/ColdFusion-10-Charting--The-new-stuff</link>
				<description>
				
				&lt;p&gt;
ColdFusion 10 includes a good number of charting enhancements including Client Side Charting using the &lt;a href=&quot;http://www.zingchart.com/&quot; target=&quot;_blank&quot;&gt;ZingChart&lt;/a&gt; library. This is great news as we can look at ZingChart documentation to look at some of the new things you can do with Charts in ColdFusion 10.
&lt;/p&gt;
&lt;p&gt;
I started playing around with this and did a quick demo of pie and bar charts with some of the new options.&lt;/br&gt;
&lt;a href=&quot;http://coldfusionria-cf10beta.securecb1cf10.ezhostingserver.com/CF10/Charting/E1.cfm&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt; (Free CF10 beta hosting from Hostek!. If it doesn&apos;t load, refresh page).

Code is pretty simple, just had to look through ZingChart documentation to exact structure builds. Code Follows...&lt;codeouter style=&quot;height: 400px; width: 100%;&quot;&gt;
&lt;code&gt;
&lt;!--- Get Graph Data ---&gt;
&lt;cfquery name=&quot;selChartData&quot; datasource=&quot;#Application.DataSource#&quot;&gt;
	SELECT
		SUM(Total) As InvTotal,
		Vendor
	FROM
		Invoices
	GROUP BY Vendor	
&lt;/cfquery&gt;

&lt;cfscript&gt;
	plotPie = {
			&quot;slice&quot;:20, //Adds the blank circle in middle
			&quot;offset&quot;:50, //Does not trigger
			&quot;rules&quot;:[ //Change styling based on values				
				{
				&quot;rule&quot;:&quot;%v &lt;= 1000000&quot;,
				&quot;background-color&quot;:&quot;##01DF01&quot;,
				&quot;border-color&quot;:&quot;##01DF01&quot;,
				&quot;border-width&quot;:2,
				&quot;shadow&quot;:true,				
				&quot;shadow-distance&quot;:8,						
				&quot;shadow-color&quot;:&quot;##6E6E6E&quot;
				},
				{
				&quot;rule&quot;:&quot;%v &gt;= 1000000&quot;,
				&quot;background-color&quot;:&quot;##DF3A01&quot;,
				&quot;border-color&quot;:&quot;##DF3A01&quot;,
				&quot;border-width&quot;:2,
				&quot;shadow&quot;:true,				
				&quot;shadow-distance&quot;:8,						
				&quot;shadow-color&quot;:&quot;##6E6E6E&quot;
				}
			]
	};
	
	plotBar = {			
			&quot;value-box&quot; : { //Add Value maximum for each bar
			    &quot;type&quot; : &quot;max&quot;,
			    &quot;text&quot; : &quot;Max: %v&quot;,
			    &quot;text-align&quot; : &quot;center&quot;
		    },
			&quot;rules&quot;:[ //Change styling based on values				
				{
				&quot;rule&quot;:&quot;%v &lt;= 1000000&quot;,
				&quot;background-color&quot;:&quot;##01DF01&quot;,
				&quot;border-color&quot;:&quot;##01DF01&quot;,
				&quot;border-width&quot;:2,
				&quot;shadow&quot;:true,				
				&quot;shadow-distance&quot;:8,						
				&quot;shadow-color&quot;:&quot;##6E6E6E&quot;
				},
				{
				&quot;rule&quot;:&quot;%v &gt;= 1000000&quot;,
				&quot;background-color&quot;:&quot;##DF3A01&quot;,
				&quot;border-color&quot;:&quot;##DF3A01&quot;,
				&quot;border-width&quot;:2,
				&quot;shadow&quot;:true,				
				&quot;shadow-distance&quot;:8,						
				&quot;shadow-color&quot;:&quot;##6E6E6E&quot;
				}
			]
	};
	
	background = {
		&quot;background-color&quot;:&quot;##F7F8E0&quot;
	};
	
	animate = { //Bars will slide up during load		
		&quot;effect&quot;:&quot;slideup&quot;
	};
	
	arrows = [ //Puts arrow on graph
		{
		&quot;from&quot;: {&quot;x&quot;:100,&quot;y&quot;:100},
		&quot;to&quot; : {&quot;x&quot;:270,&quot;y&quot;:270},
		&quot;size&quot;:2,
		&quot;label&quot;:&quot;See This&quot; //Nothing shown...
		}
	];
&lt;/cfscript&gt;

&lt;!--- Pie Graph ---&gt;
&lt;cfchart format=&quot;html&quot; ID=&quot;InvoicesCF10Pie&quot; title=&quot;Invoices by Vendor&quot; height=&quot;500&quot; width=&quot;500&quot; 
	plot=&quot;#plotPie#&quot; pieslicestyle=&quot;sliced&quot; background=&quot;#background#&quot;&gt;	
	&lt;cfchartseries type=&quot;pie&quot; query=&quot;selChartData&quot; itemcolumn=&quot;Vendor&quot; valuecolumn=&quot;InvTotal&quot; serieslabel=&quot;Total&quot;
	paintstyle=&quot;plain&quot; colorlist=&quot;##0000FF,##5858FA,##81BEF7,##2E9AFE,##0174DF&quot;&gt;
	&lt;/cfchartseries&gt;		
&lt;/cfchart&gt;

&lt;cfoutput&gt;
	&lt;hr/&gt;	
&lt;/cfoutput&gt;

&lt;!--- Bar Graph ---&gt;
&lt;cfchart format=&quot;html&quot; ID=&quot;InvoicesCF10Bar&quot; title=&quot;Invoices by Vendor&quot; height=&quot;500&quot; width=&quot;500&quot; 
	plot=&quot;#plotBar#&quot; background=&quot;#background#&quot; arrows=&quot;#arrows#&quot;&gt;	
	&lt;cfchartseries type=&quot;bar&quot; query=&quot;selChartData&quot; itemcolumn=&quot;Vendor&quot; valuecolumn=&quot;InvTotal&quot; serieslabel=&quot;Total&quot; 
	paintstyle=&quot;plain&quot; colorlist=&quot;##0000FF,##5858FA,##81BEF7,##2E9AFE,##0174DF&quot; animate=&quot;#animate#&quot;&gt;
	&lt;/cfchartseries&gt;		
&lt;/cfchart&gt;
&lt;/code&gt;
&lt;/codeouter&gt;
&lt;p&gt;
Some of the new attributes we are using are the plot, animate, background attributes.  The plot allows you to define rules which govern the styling of the data value elements of the graph. Using the rules you can set different coloring, shadow, border depending on the values. This would give you a lot of flexibility with graph display. We also find some ZingChart definitions that don&apos;t seem to have been implemented as of yet at least in the beta.
&lt;/p&gt;
&lt;p&gt;
I will continue experimentation with additional charts to see what new things we can do using ZingChart.
				</description>
				
				<category>Web Development</category>
				
				<category>ColdFusion</category>
				
				<category>ColdFusion 10</category>
				
				<pubDate>Tue, 20 Mar 2012 08:10:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2012/3/20/ColdFusion-10-Charting--The-new-stuff</guid>
				
				
			</item>
			
			<item>
				<title>ColdFusion 10 Beta and Windows 7 Install</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2012/3/13/ColdFusion-10-Beta-and-Windows-7-Install</link>
				<description>
				
				Due to work keeping my quite busy along with a drop in how much coding I actually do while working means I have not been following CF 10 and CF community that closely. But I was pretty excited to find last week that the ColdFusion 10 (Zeus) beta has been out for a few weeks now. Time to code a bit more then!

The first thing to do was install it on my new SSD (get one, its good stuff) with Windows 7. IIS was already setup for ColdFusion 9, so I just went ahead with the install. Everything seemed to be going well (lots of password warnings), but the administrator wouldn&apos;t open at the last step. Now, I hit a lot of issues installing CF9 on Windows 7 64-bit and I was hoping this was not a repetition of those issues. Thankfully it wasn&apos;t. The main change I had to made was to install the .NET Extensibility, ASP.NET and CGI features for World Wide Web Services under IIS. After that, I re-install CF 10 and everything was good to go.

Logged into CF Admin, and this is nice, very nice. What I am talking about is actually the new update installer that Adobe has included now. For anybody working with ColdFusion in production environments, 1-click install removes a big headache. Apart from that, the new Clear Query Cache option will be one of my favorite enhancements. Same thing with ability to clear cache for specific paths. This means when doing a Production hot fix, I don&apos;t need to reset cache for the whole application.

Anyway, if you have not yet download CF 10 beta, get it now:&lt;br/&gt;
&lt;a href=&quot;http://labs.adobe.com/technologies/coldfusion10/&quot; target=&quot;_blank&quot;&gt;ColdFusion 10 - Adobe Labs&lt;/a&gt;
				</description>
				
				<category>ColdFusion</category>
				
				<category>ColdFusion 10</category>
				
				<pubDate>Tue, 13 Mar 2012 15:16:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2012/3/13/ColdFusion-10-Beta-and-Windows-7-Install</guid>
				
				
			</item>
			
			<item>
				<title>Delete Duplicates using CTE in SQL Server</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2011/9/22/Delete-Duplicates-using-CTE-in-SQL-Server</link>
				<description>
				
				This is a blog post for future reference and this has proved useful to me over the past year ever (ever since I found it online). And it&apos;s time to transfer the method from email to blog.

CTE is to me (from what little I know of advanced SQL concepts) a pretty powerful feature. It stands for &lt;b&gt;Common Table Expression&lt;/b&gt; and is basically a temporary result set (table) of data that you can use within the same query execution.

I do this via a two step process, first query verifies that the CTE is generated properly, second one uses the CTE to delete the Duplicates. 

Quite frankly, I still have no idea how exactly this works, I just know it has worked for me in the past. If any SQL Guru who comes upon this post wants to explain how this exactly works in the comments section it would be very appreciated.

&lt;code&gt;
/* Build CTE and select records to verify everything looks good */
WITH CTE AS
(
SELECT ID, RANK() OVER (PARTITION BY ID ORDER BY num) rnk
FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY name) num
FROM ABC) 
X)
SELECT * FROM CTE
WHERE rnk &gt; 1

/* After verification, build CTE again and now Delete the duplicates */
WITH CTE AS
(
SELECT ID, RANK() OVER (PARTITION BY ID ORDER BY num) rnk
FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY name) num
FROM ABC) 
X)
DELETE FROM CTE
WHERE rnk &gt; 1
&lt;/code&gt;

The first query builds the CTE and we first verify that the built CTE is good, expected duplicates show up.
The second query then deletes the duplicates.

In both queries, you have to replace the &quot;ID&quot; and &quot;name&quot; parts of the query based on your table. And you might now always know what exactly to use here, well then experiment. I usually start with using the duplicate column in the &quot;name&quot; part.

This has been of use particularly in cases where the tables have duplicate data but there is no PK (or a good PK) available to drive the deletion. And maybe there is an easier way too now.
				</description>
				
				<category>SQL</category>
				
				<pubDate>Thu, 22 Sep 2011 17:38:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2011/9/22/Delete-Duplicates-using-CTE-in-SQL-Server</guid>
				
				
			</item>
			
			<item>
				<title>Browser Detection using jQuery</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2011/9/20/Browser-Detection-using-jQuery</link>
				<description>
				
				After finally getting this blog back up online, the next step was to upgrade to the latest blogCFC version (which ships with the awesome theme you see). After being done with that, I noticed this is the first time I had used the blog with Chrome, and the one thing that didn&apos;t work in Chrome is display of the RSS feed. And no better way to remind myself how to accomplish this again in the future than blogging it!

The RSS in IE/Firefox is styled (I believe because of the in built RSS reader?):

&lt;img src=&quot;http://www.coldfusion-ria.com/Blog/images/Posts/rssie.PNG&quot; /&gt;

The RSS in Chrome is not styled:

&lt;img src=&quot;http://www.coldfusion-ria.com/Blog/images/Posts/rsschrome.PNG&quot; /&gt;

One good solution to this would be to just use the Feedburner link for the RSS feed (http://feeds.feedburner.com/ColdFusionRIA) and it displays good in all browsers. But I saw it as a good opportunity to use jQuery to redirect the click based on the browser. So, now if you click the RSS link on the navigation, it will show the default blogCFC RSS in IE/Firefox but for Chrome it will go to the feedburner link.

Now the main issue I encountered (and the solution is documented at various places on the internet) is that the built in jQuery browser detection doesn&apos;t differentiate between chrome and safari. You can see this at work &lt;a href=&quot;http://www.coldfusion-ria.com/Web/jQuery/browsertest.cfm&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; (try it with different browsers)

On Chrome, the default output will detect safari. So some changes had to be made to that.

Really simple to do using jQuery too. Let&apos;s look at the code.&lt;p&gt;&lt;code&gt;
&lt;InvalidTag type=&quot;text/javascript&quot;&gt;
$.each($.browser, function(i, val) {
	$(&quot;&lt;div&gt;&quot; + i + &quot; : &lt;span&gt;&quot; + val + &quot;&lt;/span&gt;&quot;).appendTo( document.body );
		});
				
$(&quot;&lt;p&gt;Browser info (New):&lt;/p&gt;&quot;).appendTo(document.body);

//Making some changes to detection code to account for chrome...
var userAgent = navigator.userAgent.toLowerCase();				
// Figure out what browser is being used
jQuery.browser = {
	version: (userAgent.match( /.+(?:rv|it|ra|ie|me)[\/: ]([\d.]+)/ ) || [])[1],
	chrome: /chrome/.test( userAgent ),
	safari: /webkit/.test( userAgent ) &amp;&amp; !/chrome/.test( userAgent ),
	opera: /opera/.test( userAgent ),
	msie: /msie/.test( userAgent ) &amp;&amp; !/opera/.test( userAgent ),
	mozilla: /mozilla/.test( userAgent ) &amp;&amp; !/(compatible|webkit)/.test( userAgent )
};
					
$.each($.browser, function(i, val) {
    	$(&quot;&lt;div&gt;&quot; + i + &quot; : &lt;span&gt;&quot; + val + &quot;&lt;/span&gt;&quot;).appendTo( document.body );
});
&lt;/script&gt;
&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;
As you see, first we just use the default jQuery library to push browser information to the document. If you open it on chrome, you will see it actually says &quot;safari: true&quot;. To detect chrome properly we override the jQuery browser part in the code and the new result will detect the difference between safari and chrome.

After this, for the RSS link I just have to redirect the window opening based on whether it is chrome or not

&lt;code&gt;
if($.browser.chrome){
}else{
}
&lt;/code&gt;
				</description>
				
				<category>Web Development</category>
				
				<category>blogCFC</category>
				
				<category>jQuery</category>
				
				<pubDate>Tue, 20 Sep 2011 18:00:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2011/9/20/Browser-Detection-using-jQuery</guid>
				
				
			</item>
			
			<item>
				<title>cffileupload Tag - Uploading Multiple Files</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2011/9/17/cffileupload-Tag--Uploading-Multiple-Files</link>
				<description>
				
				&lt;p&gt;
Back in beta, I had made a &lt;a href=&quot;http://www.coldfusion-ria.com/Blog/index.cfm/2009/7/20/ColdFusion-9-cffileupload-Tag--Upload-Multiple-Files&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt; on this new tag in ColdFusion 9. It creates a Flash interface allowing the user to upload multiple files to the server. A pretty easy way to achieve something powerful. Back in beta, there was also a bug with the funtionality. It was that ColdFusion was not automatically passing back Success, Failure messages. With the release now, that has been taken care of, so we can revise the beta code.&lt;/p&gt;

&lt;p&gt;Demo currently unavailable
&lt;/p&gt;

&lt;p&gt;Lets take a look at how simple the code is&lt;/p&gt;&lt;p&gt;fileupload1.cfm:
&lt;code&gt;
&lt;cffileupload
	name = &quot;uploadDemo&quot;
	url=&quot;uploadSelectedFiles.cfm&quot;
	progressbar=&quot;true&quot;
	addButtonLabel = &quot;Select File(s)&quot;
	clearButtonLabel = &quot;Clear&quot;
	width=&quot;500&quot;
	height=&quot;400&quot;
	title=&quot;Multi File Upload Demo&quot;
	maxUploadSize=&quot;1&quot;
	maxFileSelect=&quot;10&quot;
	extensionfilter=&quot;*.txt,*.jpg,*.png,*.doc&quot;
	uploadButtonLabel=&quot;Upload&quot;
	&gt;
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;uploadSelectedFiles.cfm:
&lt;code&gt;
&lt;cffile action = &quot;uploadAll&quot; destination = &quot;c:\temp\&quot; nameConflict = &quot;MakeUnique&quot;&gt;
&lt;/code&gt;

Very Simple, very easy.
				</description>
				
				<category>ColdFusion 9</category>
				
				<pubDate>Sat, 17 Sep 2011 13:59:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2011/9/17/cffileupload-Tag--Uploading-Multiple-Files</guid>
				
				
			</item>
			
			<item>
				<title>cffileupload Tag - Event Handlers</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2011/9/16/cffileupload-Tag--Event-Handlers</link>
				<description>
				
				&lt;p&gt;Continuing with exploring the new multi-file upload tag functionality in ColdFusion 9, this post will build on the &lt;a href=&quot;http://www.coldfusion-ria.com/Blog/index.cfm/2009/12/27/cffileupload-Tag--Uploading-Multiple-Files&quot; target=&quot;_blank&quot;&gt;previous&lt;/a&gt; post and add event handlers. We are able to work with 3 event handlers:
&lt;ol&gt;
&lt;li&gt;onComplete - Called after each file finishes uploading&lt;/li&gt;
&lt;li&gt;onError - Called when a file upload errors out&lt;/li&gt;
&lt;li&gt;onUploadComplete - Called when all the files finish uploading&lt;/li&gt;
&lt;/ol&gt;
Demo currently unavailable.&lt;/br&gt;

Lets take a look at the code.
&lt;/p&gt;&lt;p&gt;
The main changes are in our multi-file upload tag. In addition, I am using jQuery and CFmessagebox to show results of the event handlers. 
&lt;code&gt;

&lt;html&gt;
&lt;head&gt;
&lt;InvalidTag src=&quot;../../jQuery/js/jquery-1.3.2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

&lt;!--- Our CSS for displaying callback results ---&gt;
&lt;style type=&quot;text/css&quot;&gt;
	#results{
		padding:5 5 5 5px;
	}
	
	.blue{
		color:blue;		
	}
	
	.red{
		color:red;
	}
&lt;/style&gt;

&lt;InvalidTag&gt;
	//Will be called when the file upload was successful
	function uploadSuccess(res){
		
		var newID = Math.floor(Math.random()*1001); //Generate random number
		//Append our success message to results Div
		$(&quot;#results&quot;).append(&apos;&lt;span class=&quot;blue&quot; id=&quot;id_&apos; + newID + &apos;&quot;&gt;Uploaded File : &apos; + res.FILENAME + &apos;&lt;/span&gt; &lt;br/&gt;&apos;);
		//Hide the appended message then fade it in 
		$(&quot;#id_&quot; + newID).hide().fadeIn();
	}
	
	function uploadError(res){
		var newID = Math.floor(Math.random()*101);
		$(&quot;#results&quot;).append(&apos;&lt;span class=&quot;red&quot; id=&quot;id_&apos; + newID + &apos;&quot;&gt;Error Uploading File : &apos; + res.FILENAME + &apos;&lt;/span&gt; &lt;br/&gt;&apos;);
		$(&quot;#id_&quot; + newID).hide().fadeIn();	
	}
	
	function allDone(){		
		ColdFusion.MessageBox.show(&apos;finalmsg&apos;);
	}
	
&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
	
	&lt;cffileupload
		name = &quot;uploadDemo&quot;
		url=&quot;uploadSelectedFiles2.cfm&quot;
		progressbar=&quot;true&quot;
		addButtonLabel = &quot;Select File(s)&quot;
		clearButtonLabel = &quot;Clear&quot;
		width=&quot;500&quot;
		height=&quot;400&quot;
		title=&quot;Multi File Upload Demo&quot;
		maxUploadSize=&quot;1&quot;
		maxFileSelect=&quot;10&quot;
		extensionfilter=&quot;*.txt,*.jpg,*.png,*.doc&quot;
		uploadButtonLabel=&quot;Upload&quot;
		onComplete=&quot;uploadSuccess&quot; 
		onError=&quot;uploadError&quot;  
		onUploadComplete=&quot;allDone&quot;&gt;
	
	&lt;!--- This is where we will display results as each file is uploaded ---&gt;	
	&lt;div id=&quot;results&quot;&gt;
		
	&lt;/div&gt;
	
	&lt;cfmessagebox name=&quot;finalmsg&quot; title=&quot;Done!!&quot; type=&quot;alert&quot; message=&quot;We are all Done!!&quot; labelOK=&quot;OK&quot; labelCancel=&quot;No&quot; /&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;/code&gt;

The JavaScript function uploadSuccess is called when a file finishes uploading and uploadError when an upload errors out. In both functions, a random integer is generated and jQuery is used to append a span element with that (hopefully) unique ID to the div and use some fancy animation to bring it into view.

Our code to upload the files, remains the same. 
&lt;code&gt;
&lt;cffile action = &quot;uploadAll&quot; destination = &quot;C:\temp\wwwroot\uploads\&quot; nameConflict = &quot;MakeUnique&quot;&gt;
&lt;/code&gt;

ColdFusion provides us a simple and great implementation to provide users good feedback when implementing the multi-file upload functionality.
				</description>
				
				<category>ColdFusion 9</category>
				
				<pubDate>Fri, 16 Sep 2011 14:46:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2011/9/16/cffileupload-Tag--Event-Handlers</guid>
				
				
			</item>
			
			<item>
				<title>Installing ColdFusion 9 64-but on Windows 7 64-bit Experience</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2010/2/16/Installing-ColdFusion-9-64but-on-Windows-7-64bit-Experience</link>
				<description>
				
				This weekend I got me a new laptop from Dell (Studio 15). I got it with 4 GB RAM (to me it has become a minumum now) which naturally meant going with a 64-bit OS. So, I now had this nice new laptop with Windows 7 x64 and once I was done cleaning out the bloatware, it was time to install ColdFusion. It turned out to be quite an experience and took much longer then I anticipated. But first, lets get one thing straight here, Adobe doesn&apos;t really provide any documentation on what you need to do to install CF properly on IIS 7.5. There is no, &quot;verify these windows component are installed&quot; document or screen. In any case, I had installed ColdFusion 9 on Windows 32-bit succesfully, and needless to say I felt (over)confident that I could do the same for Windows 7 64-bit.

I started out by configuring Windows have the IIS6 modules installed, I knew I had to do that. Then I ran the ColdFusion 9 install, no errors, got to the end, &quot;Press OK to start CF Admin&quot;, did that. The CF Admin screen came up and did not work. IIS 7 told me about missing extension configuration. I realized at that point something was missed in my IIS reconfiguration, and it turned out it was the ISAPI Extensions under World Wide Web Services options, so I turned all those things on, Windows reconfigured IIS for me. I opened IIS, saw tha the ISAPI extensions and filters were not installed. Ready to go right? Wrong.

Still could not get to CF Admin. Ok, lets uninstall and install CF9 I thought, since now IIS has everything it needs for proper configuration. So I did that, uninstall then install and once again pressed &quot;OK&quot; at the end. Out comes the CF Admin page, &quot;Click here&quot; to continue configuration. Yay, victory was my first though. But then I noticed, something was not right. There was no Adobe logo, no images were showing up. Doesn&apos;t matter, I was able to open a .cfm page, so I continued with the configuration and then was logged into the Admin. Still no images. By the way, the Admin looks really bad if you can&apos;t see images. So, I closed the browser and opened a new IE window and went to //localhost/cfide/administraor/ and IIS 7 gives me an Error!! But thats where the CF Admin is located, but apparently IIS can&apos;t handle the request properly.

Sigh, I did some googling. Verified that the ISAPI handlers for .cfm extensions were pointing to the right DLL. Someone suggested uninstalling CF, deleting all CF directories and installing again. So I dd that, but same error again. Still can&apos;t see images in CF Admin. Frustrating, already installed CF9 3 times. Verified IIS setup again, all looks good there. I uninstall CF9 again, restart computer, delete directories, install CF9 again and same issue again. At that point, google had helped me as much as it can. I try to use the server configuration tool but I can&apos;t remove the current flawed IIS configuration from it (some error about not able to remove things).

Decide it time to start from scratch. So, I uninstall CF9, delete CF directories, restart computer. Uninstall IIS7 from windows, restart computer. Then reinstall IIS7 and restart computer. Then reinstall CF9 and Victory!! Everything works properly. Apparently, installing the ISAP Extensions after installing CF9 screwed up the installs and configurations in IIS. So, well, it worked now. Logged into CF Admin, //localhost/cfide/administrator/ resolved properly.

But that was not the End of the Story.

Apparently, setting up a MS Access Datasource on Windows 64-bit is another issue faced by various users. You would get an error about DRIVERPATH not defined. Well I thought, if CF can&apos;t set it up, I will set it up in Windows and use ODBC socket. But the issue is that the 64-bit Windows don&apos;t come with the relevant drivers needed to setup Access Datasource in Windows. After trying to figure out how to resolve this, googling and finding some information here and there, not much help was found. In the end it was realized, that the Windows\System32\odbcad32.exe file contained the proper drivers but the Windows\SysWOW64\odbcad32.exe did not contain the drivers. So the solution was to copy over the .exe from System32 to SysWOW64. I went through with that and it worked!! Even though, ColdFusion still gave a DRIVERPATH undefned error, the datasource was verified properly and I could run all my MS Access based demos.

Whew, finally, was done with setting up Coldfusion 9 64-bit on Windows 7 64-bit.
				</description>
				
				<category>ColdFusion 9</category>
				
				<pubDate>Tue, 16 Feb 2010 01:30:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2010/2/16/Installing-ColdFusion-9-64but-on-Windows-7-64bit-Experience</guid>
				
				
			</item>
			
			<item>
				<title>ExtJS 3.0 Editor Grid with ColdFusion + Ext Toolbar Play</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2009/12/14/ExtJS-30-Editor-Grid-with-ColdFusion</link>
				<description>
				
				&lt;p&gt;
I hadn&apos;t looked at the &lt;a href=&quot;http://www.extjs.com/&quot; target=&quot;_blank&quot;&gt;Ext JS&lt;/a&gt; library in a while, but this weekend, I took a look at it with the idea of eventually building out a full CRUD grid using Ext JS and ColdFusion.  It took some time, particularly trying to figure out the phantom records implementation, but its done now.&lt;p&gt;
&lt;p&gt;&lt;a href=&quot;http://coldfusion-ria.com/Test/KSPersonal/ext/editgrid.cfm&quot; target=&quot;_blank&quot;&gt;View the Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And as always, time to look at the code.&lt;/p&gt;&lt;p&gt;HTML, very simple. Just defining all our JS/CSS includes and our grid related HTML div
&lt;code&gt;
&lt;html&gt;
	
	&lt;head&gt;
		&lt;title&gt;Ext JS Grid with ColdFusion&lt;/title&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;resources/css/ext-all.css&quot;&gt;
		&lt;InvalidTag src=&quot;adapter/ext/ext-base.js&quot;&gt;&lt;/script&gt;
		&lt;InvalidTag src=&quot;js/ext-all.js&quot;&gt;&lt;/script&gt;		
		
		&lt;InvalidTag src=&quot;editgrid.js&quot;&gt;&lt;/script&gt;
		
	&lt;/head&gt;
	&lt;body&gt;
		
		&lt;div id=&quot;editgrid&quot;&gt;&lt;/div&gt;
		
	&lt;/body&gt;
&lt;/html&gt;
&lt;/code&gt;
&lt;/p&gt;
Now the interesting stuff. The javascript.

&lt;div id=&quot;codeouter&quot; style=&quot;height:400px;width:100%;&quot;&gt;
&lt;code&gt;
Ext.onReady(function(){
	
	//This is our JSON record set which defines what kind of data will be present in the JSON passed back from our component.
	var users = Ext.data.Record.create([
	{name:&apos;ID&apos;,allowBlank:false},
	{name:&apos;FIRSTNAME&apos;,type:&apos;string&apos;},
	{name:&apos;LASTNAME&apos;,type:&apos;string&apos;},
	{name:&apos;DISPLAYNAME&apos;,type:&apos;string&apos;},
	{name:&apos;USERNAME&apos;,type:&apos;string&apos;},
	{name:&apos;USERACCOUNTINGCODE&apos;,type:&apos;string&apos;},
	{name:&apos;PHONE&apos;,type:&apos;string&apos;}
	])
	
	//The Proxy object will specify URLs to call for different CRUD operations
	var proxy = new Ext.data.HttpProxy({
		method:&apos;POST&apos;,				
		api:{
			read: &apos;Users.cfc?method=getUsers&apos;,//Our URL for reading the grid data
			create: &apos;Users.cfc?method=addUser&apos;,//For Adding a new User (future implementation)
			update: &apos;Users.cfc?method=editUser&apos;//When a User is updated
		},
		//the function writeSuccess will be called when the Store finishes a succesful write (add/edit) to the server
		listeners: {
			write: {
				fn: writeSuccess
			}
		}
	})
	
	//Our JSON Writer, configuration used to updating/adding of records
	var writer = new Ext.data.JsonWriter({
		//We will only send the changed fields
		writeAllFields:false		
	})
	
    // create the Data Store
    var store = new Ext.data.JsonStore({
    	totalProperty:&apos;DATASET&apos;,//This is how many total records are there in the set.
    	root:&apos;ROWS&apos;,//The Root of the data.        
		proxy:proxy,
		id:&apos;ID&apos;,
		successProperty:&apos;SUCCESS&apos;,//What return string data will be set to true/false to let Ext know that server call was succesful or not
		autoSave:false,//we will use event listeners to call save manually
        remoteSort:true,//We will sort server side
        //Base Params are parameters passed in during every call
        baseParams:{            	
            	returnFormat: &apos;JSON&apos;,
            	start: &apos;0&apos;,
            	limit: &apos;50&apos;
            },
        //We define the JSON Reader for the data. We also need to set the totalProperty, root and idProperty for the dataset here.
        reader: new Ext.data.JsonReader({
        		totalProperty:&apos;DATASET&apos;,
        		root:&apos;ROWS&apos;,
        		idProperty:&apos;ID&apos;												
        	},users
        ),
        //Fields read in
        fields: [
            &apos;ID&apos;,&apos;FIRSTNAME&apos;,&apos;LASTNAME&apos;,&apos;DISPLAYNAME&apos;,&apos;USERNAME&apos;,&apos;USERACCOUNTINGCODE&apos;,&apos;PHONE&apos;
        ],
		writer:writer,
		//Any Store execeptions will be caught here
		listeners: {			
			exception : function(proxy,type,action,options,res,rs) {
				alert(type);
			}
		}      
    });
	
	// Our Form Variable to be used for editor grid
	var varForm = Ext.form;
	
   	//We setup the Grid
	var cm = new Ext.grid.ColumnModel({
       columns:[
	   	new Ext.grid.RowNumberer(),//This will do numbering on the grid for us        
        {
			header: &quot;ID&quot;,
			dataIndex:&apos;ID&apos;,
			editable: false,
			width:50 
		},
		{			
            header: &quot;First Name&quot;,
            dataIndex: &apos;FIRSTNAME&apos;,
            width: 100,
            hidden:false,            
            sortable: true,			
            editor: new varForm.TextField({
                allowBlank: false
            })
        },{
            header: &quot;Last Name&quot;,
            dataIndex: &apos;LASTNAME&apos;,
            width: 100,
            hidden: false,
            sortable: true,
			editor: new varForm.TextField({
                allowBlank: false
            })
        },{
            header: &quot;Display Name&quot;,
            dataIndex: &apos;DISPLAYNAME&apos;,
            width: 150,
            hidden: false,
            sortable: true,
			 editor: new varForm.TextField({
                allowBlank: false
            })
        },{
            header: &quot;User Name&quot;,
            dataIndex: &apos;USERNAME&apos;,
            width: 100,
            hidden: false,
            sortable: true,
			editor: new varForm.TextField({
                allowBlank: false
            })
        },{
            header: &quot;Contact&quot;,
            dataIndex: &apos;PHONE&apos;,
            width: 100,
            hidden: false,
            sortable: true,
			editor: new varForm.TextField({
                allowBlank: false
            })
        }]
    })
	
	 // create the editor grid
    var grid = new Ext.grid.EditorGridPanel({
        width:750,
        height:500,		              
        title:&apos;Users&apos;,
        store: store,
        trackMouseOver:true,
        disableSelection:false,
        loadMask: true,
		stripeRows: true,
		collapsible: true,
		cm:cm,//Our column model
		frame:true,//Make it more nicer looking (?)
        clicksToEdit: 1,//One click on row data will bring on edit box
		renderTo:&apos;editgrid&apos;,
		// paging bar on the bottom
       bbar: new Ext.PagingToolbar({
            pageSize: 50,
            store: store,
            displayInfo: true,
            displayMsg: &apos;Displaying Records {0} - {1} of {2}&apos;,
            emptyMsg: &quot;No Records to display&quot;            
        }),
		tbar: new Ext.Toolbar({
			items : [
				{
					xtype:&apos;tbtext&apos;,
					text:&apos;Welcome. Click Row Data to Edit.&apos;,
					itemId:&apos;tbartext&apos;,
					id:&apos;tbartext&apos;
				}
			]
		}),
		 listeners: {
		 	afteredit: { //This listener event function will be called when user finishes editing data box and tabs/enters/clicks out.
		 		fn: editStore
		 	}
		}        
    });
	
	function editStore(e)
	{
		//Call our store&apos;s save event that will fire things off&apos;
		this.store.save();		
	}
	
	//Our server call was succesful, display user feedback here
	function writeSuccess(store, action, result, res, rs)
	{
		//Get Toolbar Object
		var tbar = grid.getTopToolbar();
		//Remove current text
		tbar.remove(&quot;tbartext&quot;);
		//Add new text		
		tbar.addText({
			xtype:&apos;tbtext&apos;,
			text:&apos;Success !! &apos; + res.MESSAGE,
			itemId:&apos;tbartextsuccess&apos;
			}
		);
		//Redo layout to render new toolbar text
		tbar.doLayout();
	}
	
	//Default Sort set for the grid load call
	store.setDefaultSort(&apos;ID&apos;,&apos;ASC&apos;);
   
    // trigger the data store load
    store.load();	
	
});
&lt;/code&gt;
&lt;/div&gt;


Hopefully, the comments will help understand what is happening. But we will look at a few important aspects of the code. In the JSON Store definition, we have:
&lt;code&gt;successProperty:&apos;SUCCESS&apos;, autoSave:false&lt;/code&gt;
By default, the successProperly is set to &quot;success&quot;. This is important, because our ColdFusion returned JSON will convert the a returned &quot;success&quot; variable to upppercase. By setting the autosave to false, we will have to make our own store.save() call to trigger the update process. For purposes of this blog post, it makes no difference what this is set to. But by setting it to false, one can allow for batch edits very easily instead of editing on each change. &lt;br/&gt;
Also, in each column definition we have added its editor definition. &lt;code&gt;editor: new varForm.TextField({ allowBlank: false })&lt;/code&gt; This will let us edit the column using a textbox, and we will not allow blank values for the column.&lt;br/&gt;
This example, implements the in-built EditGridPanel. The definition here has a couple of important things. One is the Toolbar we have specified. We will use this to show some simple user feedback. Other is the listeners. We have added a listener for the afteredit  event.
&lt;code&gt;
listeners: {
 	afteredit: { 
 		fn: editStore
	 	}
	}
&lt;/code&gt;
This event is triggered when a user changes any data in an editable cell. We are telling Ext to call the editStore function when this happens. And our edit store function, is well very simple here. Just calls the store&apos;s save method, triggering the update process.&lt;br/&gt;
&lt;/p&gt;
&lt;p&gt;
Now, if we go up a bit and look at our proxy definition.
&lt;code&gt;
//The Proxy object will specify URLs to call for different CRUD operations
	var proxy = new Ext.data.HttpProxy({
		method:&apos;POST&apos;,				
		api:{
			read: &apos;Users.cfc?method=getUsers&apos;,//Our URL for reading the grid data
			create: &apos;Users.cfc?method=addUser&apos;,//For Adding a new User (future implementation)
			update: &apos;Users.cfc?method=editUser&apos;//When a User is updated
		},
		//the function writeSuccess will be called when the Store finishes a succesful write (add/edit) to the server
		listeners: {
			write: {
				fn: writeSuccess
			}
		}
	})
&lt;/code&gt;
The proxy object can be defined to let Ext know which URLs to call for different CRUD functions. In addition, we are also specifying a listener for the write event. The write event is called upon a succesful write (add and edit) to the server. We will use this to show returned server feedback to the user.
&lt;code&gt;
/Our server call was successful, display user feedback here
	function writeSuccess(store, action, result, res, rs)
	{
		//Get Toolbar Object
		var tbar = grid.getTopToolbar();
		//Remove current text
		tbar.remove(&quot;tbartext&quot;);
		//Add new text		
		tbar.addText({
			xtype:&apos;tbtext&apos;,
			text:&apos;Success !! &apos; + res.MESSAGE,
			itemId:&apos;tbartextsuccess&apos;
			}
		);
		//Redo layout to render new toolbar text
		tbar.doLayout();
	}
&lt;/code&gt;
Our function here, manipulates the grid toolbar we have specified. First, we will remove our current toolbar text. We use the added text item&apos;s &quot;itemId&quot; that we specified for this. Then we add a new text item to the toolbar. After that, we have to call the toolbar&apos;s doLayout function, which forces Ext to recalculate the toolbar&apos;s render and hence it will show our new text.
&lt;/p&gt;
&lt;p&gt;
Our CFC is good old ColdFusion code. 

&lt;code&gt;
&lt;cfcomponent output=&quot;false&quot;&gt;
	
	&lt;cffunction name=&quot;getUsers&quot; access=&quot;remote&quot; returnFormat=&quot;json&quot; output=&quot;false&quot;&gt;
		&lt;cfargument name=&quot;limit&quot; default=&quot;50&quot;&gt;
		&lt;cfargument name=&quot;start&quot; default=&quot;1&quot;&gt;
		&lt;cfargument name=&quot;sort&quot; default=&quot;FirstName&quot;&gt;
		&lt;cfargument name=&quot;dir&quot; default=&quot;ASC&quot;&gt;
		
		&lt;cfset var arrUsers = ArrayNew(1)&gt;
		&lt;cfset var stcReturn = &quot;&quot;&gt;
		
		&lt;!--- When going back to base state, ExtJS will make the function call with start set to 0. If this is the case
		we set it to 1 ---&gt;
		&lt;cfset Arguments.start = Arguments.start + 1&gt;		
		
		&lt;cfquery name=&quot;selUsers&quot; datasource=&quot;RIADemo&quot;&gt;
				SELECT
					ID, FirstName, LastName, DisplayName, UserName, UserAccountingCode, Phone
				FROM
					Users
				ORDER BY #Arguments.sort# #Arguments.dir#
		&lt;/cfquery&gt;
		
		&lt;cfset arrUsers = convertQueryToExtJSGrid(selUsers,Arguments.start,Arguments.limit)&gt;
		
		&lt;cfset stcReturn = {rows=arrUsers,dataset=#selUsers.RecordCount#}&gt;
		
		&lt;cfreturn stcReturn&gt;
	
	&lt;/cffunction&gt;
	
	&lt;cffunction name=&quot;convertQueryToExtJSGrid&quot; access=&quot;public&quot; hint=&quot;Convert Query to JSON usable by ExtJS Grid&quot; returntype=&quot;array&quot;&gt;
		&lt;cfargument name=&quot;qryData&quot; type=&quot;query&quot; required=&quot;true&quot; hint=&quot;Query to convert&quot;&gt;
		&lt;cfargument name=&quot;intStart&quot; type=&quot;numeric&quot; required=&quot;true&quot; hint=&quot;Start of Result Set&quot;&gt;
		&lt;cfargument name=&quot;intLimit&quot; type=&quot;numeric&quot; required=&quot;true&quot; hint=&quot;How many records to return&quot;&gt;
		
		&lt;!--- For the Array ---&gt;	
		&lt;cfset var i = 1&gt;		
		&lt;cfset var end = ((Arguments.intStart) + arguments.intLimit)-1&gt;
		&lt;cfset var selUsers = &quot;&quot;&gt;
		&lt;cfset var stcReturn = &quot;&quot;&gt;
		&lt;cfset var arrUsers = ArrayNew(1)&gt;
		
		&lt;cfloop query=&quot;qryData&quot; startrow=&quot;#Arguments.intStart#&quot; endrow=&quot;#end#&quot;&gt;		
			&lt;cfset stcUsers = StructNew()&gt;
			&lt;cfset stcUsers.ID = #qryData.ID#&gt;
			&lt;cfset stcUsers.FIRSTNAME = #qryData.FirstName#&gt;
			&lt;cfset stcUsers.LASTNAME = #qryData.LastName#&gt;
			&lt;cfset stcUsers.DISPLAYNAME = #qryData.DisplayName#&gt;
			&lt;cfset stcUsers.USERNAME = #qryData.UserName#&gt;
			&lt;cfset stcUsers.USERACCOUNTINGCODE = #qryData.UserAccountingCode#&gt;
			&lt;cfset stcUsers.PHONE = #qryData.Phone#&gt;
			&lt;cfset arrUsers[i] = stcUsers&gt;
			&lt;cfset i = i + 1&gt;			
		&lt;/cfloop&gt;
		
		
		&lt;cfreturn arrUsers&gt;
		
	&lt;/cffunction&gt;
	
	&lt;cffunction name=&quot;editUser&quot; access=&quot;remote&quot; hint=&quot;Edit a User&quot; returnformat=&quot;JSON&quot;&gt;
		&lt;cfargument name=&quot;rows&quot; type=&quot;any&quot; required=&quot;true&quot; default=&quot;0&quot; hint=&quot;Row Data containing our edits&quot;&gt;
		&lt;cfargument name=&quot;id&quot; type=&quot;numeric&quot; required=&quot;true&quot; default=&quot;0&quot; hint=&quot;our ID record, will tell us which record to update&quot;&gt;
		&lt;!--- Deserialize the incoming JSON data to get our CF data ---&gt;
		&lt;cfset var stcData = deserializeJSON(Arguments.rows)&gt;
		&lt;cfset var strUpdQuery = &quot;&quot;&gt;
		&lt;cfset var updUser = &quot;&quot;&gt;
		&lt;cfset var stcReturn = &quot;&quot;&gt;
		&lt;!--- Check which field we are editing, build Edit string based on that ---&gt;
		&lt;cfif StructKeyExists(stcData,&quot;FIRSTNAME&quot;)&gt;
			&lt;cfset strUpdQuery = strUpdQuery &amp; &quot;FirstName = &apos;#stcData.FIRSTNAME#&apos;&quot;&gt;
		&lt;cfelseif StructKeyExists(stcData,&quot;LASTNAME&quot;)&gt;
			&lt;cfset strUpdQuery = strUpdQuery &amp; &quot;LastName = &apos;#stcData.LASTNAME#&apos;&quot;&gt;
		&lt;cfelseif StructKeyExists(stcData,&quot;DISPLAYNAME&quot;)&gt;
			&lt;cfset strUpdQuery = strUpdQuery &amp; &quot;DisplayName = &apos;#stcData.DISPLAYNAME#&apos;&quot;&gt;
		&lt;cfelseif StructKeyExists(stcData,&quot;USERNAME&quot;)&gt;
			&lt;cfset strUpdQuery = strUpdQuery &amp; &quot;UserName = &apos;#stcData.USERNAME#&apos;&quot;&gt;
		&lt;cfelseif StructKeyExists(stcData,&quot;PHONE&quot;)&gt;
			&lt;cfset strUpdQuery = strUpdQuery &amp; &quot;Phone = &apos;#stcData.PHONE#&apos;&quot;&gt;
		&lt;/cfif&gt;
		
		&lt;cfquery name=&quot;updUser&quot; datasource=&quot;RIADemo&quot;&gt;
			UPDATE USERS
			SET #PreserveSingleQuotes(strUpdQuery)#
			WHERE id = #Arguments.id#
		&lt;/cfquery&gt;
		
		&lt;cfquery name=&quot;selUser&quot; datasource=&quot;RIADemo&quot;&gt;
			SELECT
				ID, FirstName, LastName, DisplayName, UserName, UserAccountingCode, Phone
			FROM
				Users
			WHERE
				ID = #Arguments.id#
		&lt;/cfquery&gt;
		&lt;!--- Our return row converted to Ext JS JSON format ---&gt;
		&lt;cfset arrUsers = convertQueryToExtJSGrid(selUser,1,1)&gt;
		&lt;!--- Success!! and additional return data ---&gt;
		&lt;cfset stcReturn = {success=true,rows=arrUsers,message=&quot;Succesfully Edited User&quot;}&gt;
		
		&lt;cfreturn stcReturn&gt;
		
	&lt;/cffunction&gt;
	
	&lt;cffunction name=&quot;addUser&quot; access=&quot;remote&quot; hint=&quot;Edit a User&quot; returnformat=&quot;JSON&quot;&gt;
		
		
		&lt;cfset stcReturn = {success=true}&gt;		
		&lt;cfreturn stcReturn&gt;
		
	&lt;/cffunction&gt;

&lt;/cfcomponent&gt;
&lt;/code&gt;

The new function that I added was the editUser function. It simply, deserializes the incoming JSON, to get good old CF from it. Check which field is being edited. Run update query and then return success (because well, I assume its always going to be succesful).
&lt;/p&gt;
&lt;p&gt;
Now, the challenge that I faced while I was writing this code up, was what Ext calls &quot;phantom records&quot;. The easiest way to explain a phantom record is that it is basically a new record that has been added to the Ext Store that has not been committed to the server yet. But of course, I wasn&apos;t adding records, I was just updating someone&apos;s First Name, but Ext was still passing it off as a phantom record. What this does is that, Ext calls the create URL we have defined in our proxy instead of the update URL. For a while, I couldn&apos;t figure it out. I looked through the source, Ext used the specified idProperty for a recordset to determine whether it was a phantom or not. But I had specified my idProperty properly in the JSONReader. I searched the forums, others have seen the same issue, best suggestion given was read the source. Eventually, I realized, that you can specify an &quot;id&quot; for the JSONStore. And, so I added the simple definition:
&lt;code&gt;id:&apos;ID&apos;,&lt;/code&gt;
to my JSONStore definition, and magic, it was working as intended. Great.&lt;/p&gt;
&lt;p&gt;
So, there we have, editor grid with ExtJS and ColdFusion.&lt;br/&gt;
&lt;a href=&quot;http://coldfusion-ria.com/Test/KSPersonal/ext/editGrid.zip&quot;&gt;Download Source&lt;/a&gt; (cfm/cfc/js files)
&lt;/p&gt;
&lt;p&gt;Questions? Comments? Leave a note here or contact me. Always glad to help.&lt;/p&gt;

&lt;b&gt;Note&lt;/b&gt;: You might notice some javascript errors, especially if using Firebug. These are known bugs in the Ext JS library but don&apos;t seem to have any impact on the functionality.
				</description>
				
				<category>ColdFusion 9</category>
				
				<category>Ajax</category>
				
				<category>ColdFusion 8</category>
				
				<category>ExtJS</category>
				
				<pubDate>Mon, 14 Dec 2009 22:33:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2009/12/14/ExtJS-30-Editor-Grid-with-ColdFusion</guid>
				
				
			</item>
			
			<item>
				<title>Using jQuery based jqGrid with ColdFusion Revisited: Full CRUD grid with Advanced Searching</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2009/12/7/Using-jQuery-based-jqGrid-with-ColdFusion-Revisited-Full-CRUD-grid-with-Advanced-Searching</link>
				<description>
				
				&lt;p&gt;
It has been a while since I made my last blog post as work has kept me very busy. Over the weekend I saw that a new &lt;a href=&quot;http://www.trirand.com/blog/&quot; target=&quot;_blank&quot;&gt;jqGrid&lt;/a&gt; version had been released and that it contained in-built advanced searching (called multiple search). I also thought it was a good time to revisit my &lt;a href=&quot;http://www.coldfusion-ria.com/Blog/index.cfm/2009/2/4/Using-jQuery-based-jqGrid-with-ColdFusion-Part-4-Full-CRUD-grid-with-Custom-Search-Screen&quot; target=&quot;_blank&quot;&gt;earlier blog post&lt;/a&gt; on a full CRUD grid and update it to 3.6 specifications.&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://www.coldfusion-ria.com/Test/KSPersonal/jquery/gridtest2.cfm&quot; target=&quot;_blank&quot;&gt;
&lt;img src=&quot;http://www.coldfusion-ria.com/Blog/images/grid2.png&quot;&gt;
&lt;/a&gt;&lt;br/&gt;
This implementation uses the following jqGrid features:
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Inbuilt Form based Add, Edit, Delete and Search functionality&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Search is done using new Multiple Search feature&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Exploration of a few additional colModel parameters&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.coldfusion-ria.com/Test/KSPersonal/jquery/gridtest2.cfm&quot; target=&quot;_blank&quot;&gt;View the Demo&lt;/a&gt; : this is all realtime, any updates made will be reflected in the grid.
&lt;br/&gt;
Now, lets look at the code
&lt;/p&gt;&lt;p&gt;
The HTML is still very simple.
&lt;code&gt;
&lt;table id=&quot;list&quot; class=&quot;scroll&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;/table&gt;
&lt;div id=&quot;pager&quot; class=&quot;scroll&quot;&gt;&lt;/div&gt;
&lt;/code&gt;
Let&apos;s see the javascript that defines our grid.
&lt;div id=&quot;codeouter&quot; style=&quot;height: 400px; width: 100%;&quot;&gt;
&lt;code&gt;
&lt;InvalidTag&gt;
		
	$(document).ready(function()
		{	
			$(&quot;#list&quot;).jqGrid(
			{
				url:&apos;Users2.cfc?method=getUsers&apos;, //CFC that will return the users
				datatype: &apos;json&apos;, //We specify that the datatype we will be using will be JSON
				colNames:[&apos;ID&apos;,&apos;First Name&apos;,&apos;Last Name&apos;, &apos;Display Name&apos;,&apos;User Name&apos;], //Column Names
				//The Column Model to define the data. Note you can make columns non sortable, specify width, alignment, etc.
				colModel :[
					{name:&apos;id&apos;,index:&apos;id&apos;, width:75, sorttype:&quot;int&quot;,editable:false,searchoptions:{sopt:[&apos;eq&apos;,&apos;lt&apos;,&apos;le&apos;,&apos;gt&apos;,&apos;ge&apos;]}},
					{name:&apos;FirstName&apos;,index:&apos;FirstName&apos;, width:150, sorttype:&quot;text&quot;,searchoptions:{sopt:[&apos;eq&apos;,&apos;bw&apos;,&apos;ew&apos;,&apos;cn&apos;]},
						editable:true,edittype:&quot;text&quot;,editoptions:{size:50},editrules:{required:true},formoptions:{elmprefix:&quot;(*)&quot;}},
					{name:&apos;LastName&apos;,index:&apos;LastName&apos;, width:150, align:&quot;left&quot;,sorttype:&quot;text&quot;,searchoptions:{sopt:[&apos;eq&apos;,&apos;bw&apos;,&apos;ew&apos;,&apos;cn&apos;]},
						editable:true,edittype:&quot;text&quot;,editoptions:{size:50},editrules:{required:true},formoptions:{elmprefix:&quot;(*)&quot;}},
					{name:&apos;DisplayName&apos;,index:&apos;DisplayName&apos;, width:150, align:&quot;left&quot;,sorttype:&quot;text&quot;,searchoptions:{sopt:[&apos;eq&apos;,&apos;bw&apos;,&apos;ew&apos;,&apos;cn&apos;]},
						editable:true,edittype:&quot;text&quot;,editoptions:{size:50},editrules:{required:true},formoptions:{elmprefix:&quot;(*)&quot;}},
					{name:&apos;UserName&apos;,index:&apos;UserName&apos;, width:150,align:&quot;left&quot;,sorttype:&quot;text&quot;,searchoptions:{sopt:[&apos;eq&apos;,&apos;bw&apos;,&apos;ew&apos;,&apos;cn&apos;]},
						editable:true,edittype:&quot;text&quot;,editoptions:{size:50},editrules:{required:true},formoptions:{elmprefix:&quot;(*)&quot;}}
				],//searchoptions parameter is used to limit the operators available during search
				pager: $(&apos;#pager&apos;), //The div we have specified, tells jqGrid where to put the pager
				rowNum:20, //Number of records we want to show per page
				rowList:[20,30,40,50], //Row List, to allow user to select how many rows they want to see per page
				sortorder: &quot;asc&quot;, //Default sort order
				sortname: &quot;ID&quot;, //Default sort column
				viewrecords: true, //Shows the nice message on the pager
				imgpath: &apos;/Test/themes/basic/images&apos;, //Image path for prev/next etc images
				caption: &apos;Users&apos;, //Grid Name
				recordtext: &quot;Record {0} - {1} of {2}&quot;,//Pager information to show
				rownumbers: true,//Show row numbers
				rownumWidth: &quot;40&quot;,//Width of the row numbers column
				sortable: true,
				height:&apos;auto&apos;, //I like auto, so there is no blank space between. Using a fixed height can mean either a scrollbar or a blank space before the pager
				mtype:&apos;POST&apos;,	
				toolbar:[true,&quot;top&quot;], //Shows the toolbar at the top. We will use it to display user feedback
				//The JSON reader. This defines what the JSON data returned from the CFC should look like
				jsonReader: {
					root: &quot;ROWS&quot;, //our data
                    page: &quot;PAGE&quot;, //current page
                    total: &quot;TOTAL&quot;, //total pages
                    records:&quot;RECORDS&quot;, //total records
					userdata:&quot;USERDATA&quot;, //Userdata we will pass back for feedback
					cell: &quot;&quot;, //Not Used
					id: &quot;0&quot; //Will default to first column
					},
				editurl:&quot;Users2.cfc?method=addeditUser&quot; //The Add/Edit function call				
				}				
			).navGrid(&apos;#pager&apos;,
				{
					search:true,searchtitle:&quot;Search&quot;,//title set for hover over display
					edit:true,edittitle:&quot;Edit User&quot;,
					add:true,addtitle:&quot;Add User&quot;,
					del:true,deltitle:&quot;Delete User&quot;
				},
			// Edit Options. savekey parameter will keybind the Enter key to submit.
			{editCaption:&quot;Edit User&quot;,edittext:&quot;Edit&quot;,closeOnEscape:true, savekey: [true,13],errorTextFormat:commonError,width:&quot;450&quot;
				,reloadAfterSubmit:true,bottominfo:&quot;Fields marked with (*) are required&quot;,top:&quot;60&quot;,left:&quot;70&quot;}, 
			{addCaption:&quot;Add User&quot;,closeOnEscape:true,savekey: [true,13],errorTextFormat:commonError,width:&quot;450&quot;
				,reloadAfterSubmit:true,bottominfo:&quot;Fields marked with (*) are required&quot;,top:&quot;60&quot;,left:&quot;70&quot;}, //Add Options
			{url:&quot;Users2.cfc?method=delUser&quot;,caption:&quot;Delete User&quot;,closeOnEscape:true,errorTextFormat:commonError,top:&quot;60&quot;,left:&quot;70&quot;,
				reloadAfterSubmit:true}, //Delete Options
			 //Search Options. multipleSearch parameter lets it know we are going to use the new advanced search feature
			{errorTextFormat:commonError,Find:&quot;Search&quot;,closeOnEscape:true,caption:&quot;Search Users&quot;,multipleSearch:true,closeAfterSearch:true}
			);			
		
		//Function will be called when add/edit encounters an error. The returned message is what will be shown to user	
		function commonError(data)
		{			
			return &quot;Error Occured during Operation. Please try again&quot;;
		}
			
		}
	);
	&lt;/script&gt;
&lt;/code&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;
Hopefully the comments in the code help understand what is going on. I am taking advantage of new colModel definitions that we can specify to help 
the multiple search feature. You can see this in the &lt;b&gt;searchoptions&lt;/b&gt; parameter specification. The sopt array array specifies which operators can be associated with the search field, so for example, ID which is an integer can only handle equal, less than, less than equal to, greater than and greater than equal to operators. While the rest of the search fields which are text fields use operators more suited to text based searching. 
&lt;br/&gt;&lt;br/&gt;
We are also using the &lt;b&gt;formoptions&lt;/b&gt; parameter and passing the elmprefix value. This value we have passed will be appended to our input elements. In this case we will use it to tell the user which fields are required.
&lt;br/&gt;&lt;br/&gt;
In addition, we have specified additional parameters for the Add/Edit/Delete options. These include specifying the savekey (this is set to Enter, so pressing Enter will submit the Add/Edit form), closeOnEscape is set to true (you can close those modal dialogs with the Esc key). We have also specified our error handler for Add/Edit which is the function commonError. It will return a generic error message to the user. In order to use the multiple search implementation in jqGrid we have specified the multipleSearch parameter to true (so simple it is).
&lt;/p&gt;
&lt;p&gt;
We also have our CFC component that will form the bridge between our grid and database.
&lt;div id=&quot;codeouter&quot; style=&quot;height: 400px; width: 100%;&quot;&gt;
&lt;code&gt;
&lt;cfcomponent output=&quot;false&quot;&gt;
	
	&lt;cffunction name=&quot;getUsers&quot; access=&quot;remote&quot; returnformat=&quot;json&quot;&gt;
		&lt;cfargument name=&quot;page&quot; required=&quot;no&quot; default=&quot;1&quot; hint=&quot;Page user is on&quot;&gt;
	    &lt;cfargument name=&quot;rows&quot; required=&quot;no&quot; default=&quot;10&quot; hint=&quot;Number of Rows to display per page&quot;&gt;
	    &lt;cfargument name=&quot;sidx&quot; required=&quot;no&quot; default=&quot;&quot; hint=&quot;Sort Column&quot;&gt;
	    &lt;cfargument name=&quot;sord&quot; required=&quot;no&quot; default=&quot;ASC&quot; hint=&quot;Sort Order&quot;&gt;
	    &lt;cfargument name=&quot;nd&quot; required=&quot;no&quot; default=&quot;0&quot;&gt;
	    &lt;cfargument name=&quot;_search&quot; required=&quot;no&quot; default=&quot;false&quot;&gt;
	    &lt;cfargument name=&quot;filters&quot; required=&quot;no&quot; default=&quot;&quot;&gt;
		
		&lt;cfset var arrUsers = ArrayNew(1)&gt;
		&lt;cfset var strMsg = &quot;&quot;&gt;
		&lt;cfset var strMsgType = &quot;Success&quot;&gt;
		&lt;cfset var records = &quot;&quot;&gt;
		&lt;cfset var blnSearch = Arguments._search&gt;
		&lt;cfset var strSearch = &quot;&quot;&gt;	
		
		&lt;!--- Determine whether this a search call and if so build our search parameters ---&gt;
		&lt;cfif Arguments.filters NEQ &quot;&quot; AND blnSearch&gt;
			&lt;cfset stcSearch = DeserializeJSON(Arguments.filters)&gt;
			&lt;cfif isDefined(&quot;stcSearch.groupOp&quot;)&gt;
				&lt;cfset strSearch = buildSearch(stcSearch)&gt;
			&lt;/cfif&gt;			
		&lt;/cfif&gt;
		
		&lt;cfquery name=&quot;selUsers&quot; datasource=&quot;RIADemo&quot; result=&quot;res&quot;&gt;
			SELECT
				ID, FirstName, LastName, DisplayName, UserName
			FROM
				Users
			&lt;cfif blnSearch AND strSearch NEQ &quot;&quot;&gt;
				#PreserveSingleQuotes(strSearch)#
			&lt;/cfif&gt;
			ORDER BY #sidx# #sord#				
		&lt;/cfquery&gt;
		
		
		
		&lt;cfset records = selUsers&gt;
		
		
		&lt;!--- Calculate the Start Position for the loop query.
		So, if you are on 1st page and want to display 4 rows per page, for first page you start at: (1-1)*4+1 = 1.
		If you go to page 2, you start at (2-)1*4+1 = 5  ---&gt;
		&lt;cfset start = ((arguments.page-1)*arguments.rows)+1&gt;
		
		&lt;!--- Calculate the end row for the query. So on the first page you go from row 1 to row 4. ---&gt;
		&lt;cfset end = (start-1) + arguments.rows&gt;
		
		&lt;!--- When building the array ---&gt;
		&lt;cfset i = 1&gt;
		
		&lt;cfloop query=&quot;records&quot; startrow=&quot;#start#&quot; endrow=&quot;#end#&quot;&gt;
			&lt;!--- Array that will be passed back needed by jqGrid JSON implementation ---&gt;		
			&lt;cfset arrUsers[i] = [#ID#,#FirstName#,#LastName#,#DisplayName#,#UserName#]&gt;
			&lt;cfset i = i + 1&gt;			
		&lt;/cfloop&gt;
		
		&lt;!--- Calculate the Total Number of Pages for your records. ---&gt;
		&lt;cfset totalPages = Ceiling(records.recordcount/arguments.rows)&gt;
		
		&lt;!--- The JSON return ---&gt;
		&lt;cfset strReturn = {total=#totalPages#,page=#Arguments.page#,records=#records.recordcount#,rows=arrUsers}&gt;
		
		&lt;cfreturn strReturn&gt;
		
	&lt;/cffunction&gt;
	
	&lt;cffunction name=&quot;addeditUser&quot; access=&quot;remote&quot; hint=&quot;Add or Edit User Data&quot; returnformat=&quot;json&quot;&gt;
		&lt;cfargument name=&quot;FirstName&quot; required=&quot;yes&quot; hint=&quot;Field that was Added or editted&quot;&gt;
		&lt;cfargument name=&quot;LastName&quot; required=&quot;yes&quot; hint=&quot;Field that was Added or editted&quot;&gt;
		&lt;cfargument name=&quot;DisplayName&quot; required=&quot;yes&quot; hint=&quot;Field that was Added or editted&quot;&gt;
		&lt;cfargument name=&quot;UserName&quot; required=&quot;yes&quot; hint=&quot;Field that was Added or editted&quot;&gt;		
		&lt;cfargument name=&quot;ID&quot; required=&quot;yes&quot; hint=&quot;the User that was Added or editted&quot;&gt;
		&lt;cfargument name=&quot;oper&quot; required=&quot;no&quot; default=&quot;edit&quot; hint=&quot;Whether this is an add or edit&quot;&gt;
		
		&lt;cfset var strMsg = &quot;&quot;&gt;
		&lt;cfset var strMsgType = &quot;Success&quot;&gt;
		&lt;cfset var userdata = &quot;&quot;&gt;
		
		&lt;cfif oper EQ &quot;edit&quot;&gt;
			&lt;cfset strMsg = &quot;User Editted&quot;&gt;		
			&lt;!--- Take the data, update your record. Simple. ---&gt;
			&lt;cftry&gt;
				&lt;cfquery name=&quot;editUser&quot; datasource=&quot;RIADemo&quot;&gt;
					UPDATE
						Users
					SET
						FirstName = &apos;#Arguments.FirstName#&apos;,
						LastName = &apos;#Arguments.LastName#&apos;,
						DisplayName = &apos;#Arguments.DisplayName#&apos;,
						UserName = &apos;#Arguments.UserName#&apos;						
					WHERE
						ID = #Val(Arguments.ID)#
				&lt;/cfquery&gt;
			&lt;cfcatch type=&quot;any&quot;&gt;
				&lt;!--- Error, return message ---&gt;
				&lt;cfset strMsgType = &quot;Error&quot;&gt;
				&lt;cfset strMsg = &quot;Error Occured when editing user. An Error report has been submitted to support.&quot;&gt;
				&lt;cfthrow message=&quot;Error Occured During Edit&quot;&gt;
			&lt;/cfcatch&gt;
			&lt;/cftry&gt;
		&lt;cfelse&gt;
			&lt;cfset strMsg = &quot;User Added&quot;&gt;
			&lt;cftry&gt;				
			&lt;cfquery name=&quot;addUser&quot; datasource=&quot;RIADemo&quot;&gt;
				INSERT INTO USERS(FirstName,LastName,DisplayName,UserName)
				VALUES (&apos;#Arguments.FirstName#&apos;,&apos;#Arguments.LastName#&apos;,&apos;#Arguments.DisplayName#&apos;,&apos;#Arguments.UserName#&apos;)
			&lt;/cfquery&gt;
			&lt;cfcatch&gt;
				&lt;!--- Error, return message ---&gt;
				&lt;cfset strMsgType = &quot;Error&quot;&gt;
				&lt;cfset strMsg = &quot;Error occured when Adding User. An Error report has been submitted to support.&quot;&gt;
				&lt;cfthrow message=&quot;Error Occured During Add&quot;&gt;
			&lt;/cfcatch&gt;
			&lt;/cftry&gt;
		&lt;/cfif&gt;
		&lt;!--- We just need to pass back some user data for display purposes ---&gt;
		&lt;cfset userdata = {type=&quot;#strMsgType#&quot;,msg=&quot;#strMsg#&quot;}&gt;
		&lt;cfset strReturn = {userdata=#userdata#}&gt;
		
		&lt;cfreturn strReturn&gt;
		
	&lt;/cffunction&gt;
	
	&lt;cffunction name=&quot;delUser&quot; access=&quot;remote&quot; hint=&quot;Delete Selected User&quot; returnformat=&quot;json&quot;&gt;		
		&lt;cfargument name=&quot;id&quot; required=&quot;yes&quot; hint=&quot;id to delete&quot;&gt;
		
		&lt;cfset var strMsg = &quot;&quot;&gt;
		&lt;cfset var strMsgType = &quot;Success&quot;&gt;
		&lt;cfset var userdata = &quot;&quot;&gt;
		&lt;cfset var delUser = &quot;&quot;&gt;
		
		&lt;cftry&gt;
			&lt;cfset strMsg = &quot;Deleted User&quot;&gt;
			&lt;cfquery name=&quot;delUser&quot; datasource=&quot;RIADemo&quot;&gt;
				DELETE FROM Users WHERE ID = #Val(Arguments.id)#
			&lt;/cfquery&gt;
		&lt;cfcatch&gt;
			&lt;!--- Error, return message ---&gt;
			&lt;cfset strMsgType = &quot;Error&quot;&gt;
			&lt;cfset strMsg = &quot;Error occured when Deleting User. An Error report has been submitted to support.&quot;&gt;
		&lt;/cfcatch&gt;
		&lt;/cftry&gt;
		
		&lt;cfset userdata = {type=&quot;#strMsgType#&quot;,msg=&quot;#strMsg#&quot;}&gt;
		&lt;cfset strReturn = {userdata=#userdata#}&gt;
		
		&lt;cfreturn strReturn&gt;
		
	&lt;/cffunction&gt;
	
	&lt;cffunction name=&quot;buildSearch&quot; access=&quot;private&quot; hint=&quot;Build our Search Parameters&quot;&gt;
		&lt;cfargument name=&quot;stcSearch&quot; required=&quot;true&quot;&gt;
		
		&lt;!--- strOp will be either AND or OR based on user selection ---&gt;
		&lt;cfset var strOp = stcSearch.groupOp&gt;
		&lt;cfset var arrFilter = stcSearch.rules&gt;
		&lt;cfset var strSearch = &quot;&quot;&gt;
		&lt;cfset var strSearchVal = &quot;&quot;&gt;
		
		&lt;!--- Loop over array of passed in search filter rules to build our query string ---&gt;
		&lt;cfloop array=&quot;#arrFilter#&quot; index=&quot;arrIndex&quot;&gt;
			&lt;cfset strField = arrIndex[&quot;field&quot;]&gt;
			&lt;cfset strOp = arrIndex[&quot;op&quot;]&gt;
			&lt;cfset strValue = arrIndex[&quot;data&quot;]&gt;
			
			&lt;cfset strSearchVal = buildSearchArgument(strField,strOp,strValue)&gt;
			
			&lt;cfif strSearchVal NEQ &quot;&quot;&gt;
				&lt;cfif strSearch EQ &quot;&quot;&gt;
					&lt;cfset strSearch = &quot;WHERE (#PreserveSingleQuotes(strSearchVal)#)&quot;&gt;
				&lt;cfelse&gt;
					&lt;cfset strSearch = strSearch &amp; &quot;#strOp# (#PreserveSingleQuotes(strSearchVal)#)&quot;&gt;				
				&lt;/cfif&gt;
			&lt;/cfif&gt;
			
		&lt;/cfloop&gt;
		
		&lt;cfreturn strSearch&gt;
				
	&lt;/cffunction&gt;
	
	&lt;cffunction name=&quot;buildSearchArgument&quot; access=&quot;private&quot; hint=&quot;Build our Search Argument based on parameters&quot;&gt;
		&lt;cfargument name=&quot;strField&quot; required=&quot;true&quot; hint=&quot;The Field which will be searched on&quot;&gt;
		&lt;cfargument name=&quot;strOp&quot; required=&quot;true&quot; hint=&quot;Operator for the search criteria&quot;&gt;
		&lt;cfargument name=&quot;strValue&quot; required=&quot;true&quot; hint=&quot;Value that will be searched for&quot;&gt;
		
		&lt;cfset var searchVal = &quot;&quot;&gt;
		
		&lt;cfif Arguments.strValue EQ &quot;&quot;&gt;
			&lt;cfreturn &quot;&quot;&gt;
		&lt;/cfif&gt;
		
		&lt;cfscript&gt;
			switch(Arguments.strOp)
			{
				case &quot;eq&quot;:
					//ID is numeric so we will check for that
					if(Arguments.strField EQ &quot;id&quot;)
					{
						searchVal = &quot;#Arguments.strField# = #Arguments.strValue#&quot;;
					}else{
						searchVal = &quot;#Arguments.strField# = &apos;#Arguments.strValue#&apos;&quot;;
					}
					break;				
				case &quot;lt&quot;:
					searchVal = &quot;#Arguments.strField# &lt; #Arguments.strValue#&quot;;
					break;
				case &quot;le&quot;:
					searchVal = &quot;#Arguments.strField# &lt;= #Arguments.strValue#&quot;;
					break;
				case &quot;gt&quot;:
					searchVal = &quot;#Arguments.strField# &gt; #Arguments.strValue#&quot;;
					break;
				case &quot;ge&quot;:
					searchVal = &quot;#Arguments.strField# &gt;= #Arguments.strValue#&quot;;
					break;
				case &quot;bw&quot;:
					searchVal = &quot;#Arguments.strField# LIKE &apos;#Arguments.strValue#%&apos;&quot;;
					break;
				case &quot;ew&quot;:					
					searchVal = &quot;#Arguments.strField# LIKE &apos;%#Arguments.strValue#&apos;&quot;;
					break;
				case &quot;cn&quot;:
					searchVal = &quot;#Arguments.strField# LIKE &apos;%#Arguments.strValue#%&apos;&quot;;
					break;
			}			
		&lt;/cfscript&gt;
		
		&lt;cfreturn searchVal&gt;
	
	&lt;/cffunction&gt;
	
&lt;/cfcomponent&gt;
&lt;/code&gt;
&lt;/div&gt;
&lt;p&gt;
Source Code (cfm/cfc) &lt;a href=&quot;http://www.coldfusion-ria.com/Test/KSPersonal/jQuery_jqGrid_ColdFusion_revisited.zip&quot;&gt;Here&lt;/a&gt;.
&lt;br/&gt;
Feel free to contact me if you have any questions and I will try to help you out. 
&lt;/p&gt;
				</description>
				
				<category>ColdFusion 9</category>
				
				<category>Ajax</category>
				
				<category>ColdFusion 8</category>
				
				<category>jQuery</category>
				
				<pubDate>Mon, 07 Dec 2009 18:55:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2009/12/7/Using-jQuery-based-jqGrid-with-ColdFusion-Revisited-Full-CRUD-grid-with-Advanced-Searching</guid>
				
				
			</item>
			
			<item>
				<title>Playing with jQuery UI : Part 1</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2009/8/31/Playing-with-jQuery-UI--Part-1</link>
				<description>
				
				&lt;p&gt;I downloaded the jQuery UI library a few weeks back (should have done it earlier too). I started playing around with it, but work has been so busy did not get much time to look at it. Finally, found some time to do a basic tabs, accordians, sliders, progress bar demo. Its very basic, good start to learing how some of the things work.&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://coldfusion-ria.com/Test/KSPersonal/jquery/ui/index.cfm&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt;
&lt;/p&gt;

The progress bar demo is probably the most complex one, so code for it follows.&lt;p&gt;
For the progress bar, the main idea was to find a way to increment the value of the bar. This is done using the setTimeout method.
&lt;/p&gt;
&lt;code&gt;
&lt;InvalidTag&gt;
		//Set Progress Bar
		$(function(){
			$(&quot;#progressbar&quot;).progressbar({
				value:0
			});
			$(&quot;#progressvalue&quot;).html(&quot;0&quot;);
			//Use setTimeout to call checkValue function
			setTimeout(checkValue,500);
		});

		//Get current value, increment it if needed to update Progressbar.
		//Recursive function calls using setTimeout
		function checkValue(){
			var currentValue = $(&quot;#progressbar&quot;).progressbar(&quot;option&quot;,&quot;value&quot;);
			currentValue = currentValue + 20;
			if (currentValue &lt;= 100) {
				updateValue(currentValue);
				$(&quot;#progressvalue&quot;).html(currentValue);
				setTimeout(checkValue,500);
			}else
			//100% loaded, now load sliders.cfm page
			{
				$(&quot;#content&quot;).load(&quot;sliders.cfm&quot;);
			}
		}
		//Show the progress bar value
		function updateValue(newValue){
			$(&quot;#progressbar&quot;).progressbar(&quot;option&quot;,&quot;value&quot;,newValue);
		}
	&lt;/script&gt;

	&lt;div id=&quot;content&quot;&gt;

		&lt;div id=&quot;progressbar&quot;&gt;

		&lt;/div&gt;

		&lt;div id=&quot;progressvalue&quot;&gt;

		&lt;/div&gt;


	&lt;/div&gt;
&lt;/code&gt;
&lt;p&gt;
So setTimeout is called every 500 ms, as long as the value is less than 100. You probably have to change the code a bit if your increments are not by values that would make the bar reach a value of 100. When the value reaches 100 we use the jQuery load function to load our sliders.cfm page.
&lt;/p&gt;
&lt;p&gt;
I hope to build on this more, especially want to see how the tabs integrate with my jqGrid examples and also interacting with ColdFusion pages.
&lt;/p&gt;
				</description>
				
				<category>Web Development</category>
				
				<category>Ajax</category>
				
				<category>jQuery</category>
				
				<pubDate>Mon, 31 Aug 2009 13:25:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2009/8/31/Playing-with-jQuery-UI--Part-1</guid>
				
				
			</item>
			
			<item>
				<title>Registration for CFinNC Conference Open (Free ColdFusion based Conference)</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2009/8/25/Registeration-for-CFinNC-Conference-Open-Free-ColdFusion-based-Conference</link>
				<description>
				
				&lt;p&gt;I am personally from Charlotte, so when the &lt;a href=&quot;http://www.cfinnc.com&quot; target=&quot;_blank&quot;&gt; CFinNC&lt;/a&gt; Conference was announced, it was very exciting. I wanted to get to CFUnited this year but could not make it because of a very busy work schedule, so a weekend conference a few hours away was awesome. And on top of everything it is Free. Let me say that again, it is Free.&lt;/p&gt;
&lt;p&gt;
They put out a provisional list of speakers and its a very good list. A lot of people who I wanted to listen to in previous conferences will be there.
&lt;/p&gt;
&lt;p&gt;
So head on over to &lt;a href=&quot;http://www.cfinnc.com&quot; target=&quot;_blank&quot;&gt;cfinnc.com&lt;/a&gt; and register for it.
&lt;/p&gt;
				</description>
				
				<category>ColdFusion 9</category>
				
				<category>ColdFusion 8</category>
				
				<category>Other</category>
				
				<pubDate>Tue, 25 Aug 2009 15:17:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2009/8/25/Registeration-for-CFinNC-Conference-Open-Free-ColdFusion-based-Conference</guid>
				
				
			</item>
			
			<item>
				<title>jqGrid 3.5 with jQuery UI ThemeRoller Themes Demos</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2009/8/2/jqGrid-35-with-jQuery-UI-ThemeRoller-Support-Demos</link>
				<description>
				
				&lt;p&gt;
&lt;a href=&quot;http://www.trirand.com/blog/&quot; target=&quot;_blank&quot;&gt;jqGrid&lt;/a&gt; 3.5 was released yesterday. It includes lots of good features, including a new rendering engine for faster loading. It also now supports &lt;a href=&quot;http://jqueryui.com/&quot; target=&quot;_blank&quot;&gt;jQuery UI&lt;/a&gt; ThemeRoller themes, so to start off itself you have access to variety of styles and can create your own easily too.&lt;/p&gt;

&lt;p&gt;
So I went ahead and created a demo that shows the grid in all these themes.&lt;br/&gt;
&lt;a href=&quot;http://www.coldfusion-ria.com/Test/KSPersonal/jQuery/gridtest1.cfm&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;How I did this style selection switch, follows&lt;/p&gt;&lt;p&gt;
The creation of grid hasn&apos;t changed and all that script remains the same, I have blogged about it &lt;a href=&quot;http://www.coldfusion-ria.com/Blog/index.cfm/2009/1/27/Using-jQuery-based-jqGrid-with-ColdFusion-Part-1&quot; target=&quot;_blank&quot;&gt;before&lt;/a&gt;. The main thing to look at here is using ColdFusion with jQuery to implement the style switching. There are probably others (and maybe better) ways to do this, but here I describe how I came about doing it.
&lt;/p&gt;

&lt;p&gt;
The first thing to do was to make it scaleable, that means I don&apos;t have to know the names of the themes and don&apos;t have to change any code if a theme based on ThemeRoller is added in the future. We use good old cfdirectory for that and read all the ThemeRoller theme subdirectories from the css directory within our path. Then I build the form using cfselect and cfinput.
&lt;code&gt;
&lt;!--- Get all the theme directories ---&gt;
&lt;cfdirectory action=&quot;list&quot; directory=&quot;#GetDirectoryFromPath(GetTemplatePath())#css&quot; type=&quot;dir&quot;  name=&quot;dirContents&quot;&gt;
&lt;!--- Either the selected theme is passed in otherwise we set it to the first theme in directory ---&gt;
&lt;cfparam name=&quot;Form.cssName&quot; default=&quot;#dirContents.name#&quot;&gt;
&lt;!--- Our Form that displays the selections ---&gt;
&lt;cfform action=&quot;gridtest1.cfm&quot; id=&quot;cssForm&quot; name=&quot;cssForm&quot;&gt;
&lt;table&gt;
&lt;tr&gt;&lt;td&gt;Themes:&lt;/td&gt;&lt;td&gt;
&lt;cfselect query=&quot;dirContents&quot; display=&quot;name&quot; value=&quot;name&quot; name=&quot;cssList&quot; id=&quot;cssList&quot; selected=&quot;#Form.cssName#&quot;&gt;
&lt;/cfselect&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;
Current Theme:&lt;/td&gt;&lt;td&gt;
&lt;cfinput type=&quot;text&quot; id=&quot;cssName&quot; name=&quot;cssName&quot; value=&quot;#Form.cssName#&quot;&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/cfform&gt;
&lt;/code&gt;

The form field csBane will  be used to read the selected theme and load it. For that we have a short javascript function that loads a css file. I found this function on the net.
&lt;code&gt;
function load(url_, /*optional*/ media_) 
{
// We are preventing loading a file already loaded
var _links = document.getElementsByTagName(&quot;link&quot;);
var _head = document.getElementsByTagName(&quot;head&quot;)[0];                

// Loop through the length of the links
for( i = 0; _links.length &gt; i; i++)
{
    // If the href is already present, remove it
    if (_links[i][&quot;href&quot;] == url_)
    {
        _head.removeChild(_links[i]);
    }
}

// Optional parameters check
var _media = media_ === undefined || media_ === null ? &quot;all&quot; : media_;

// Build link element
var _elstyle = document.createElement(&quot;link&quot;);
_elstyle.setAttribute(&quot;rel&quot;, &quot;stylesheet&quot;);
_elstyle.setAttribute(&quot;type&quot;, &quot;text/css&quot;);
_elstyle.setAttribute(&quot;media&quot;, _media);
_elstyle.setAttribute(&quot;href&quot;, url_);

// Add style
_head.appendChild(_elstyle);
}
&lt;/code&gt;

Next we need a little bit of script in our main file to read the selected stylesheet and load it and also to submit our form when the style selection is changed.
&lt;code&gt;
&lt;InvalidTag&gt;
sel = document.cssForm.cssName.value;
$(&quot;#cssList&quot;).change(function()
{
	var selStyle = $(&quot;#cssForm option:selected&quot;).val();
	document.cssForm.cssName.value = selStyle;
	document.cssForm.submit();
});
	var loadVar = &quot;css/&quot; + sel + &quot;/jquery-ui-1.7.2.custom.css&quot;;
	load(loadVar);
&lt;/script&gt;
&lt;/code&gt;

So here we read the selected theme and load it. We also bind the change function to our cfselect and set the cssName value to the selected option and submit the form.
&lt;/br&gt;
Update: Demo is back Online.
				</description>
				
				<category>Web Development</category>
				
				<category>ColdFusion 9</category>
				
				<category>Ajax</category>
				
				<category>jQuery</category>
				
				<pubDate>Sun, 02 Aug 2009 14:54:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2009/8/2/jqGrid-35-with-jQuery-UI-ThemeRoller-Support-Demos</guid>
				
				
			</item>
			
			<item>
				<title>ColdFusion 9 cfgrid with ORM: Part 2 - Full CRUD Grid</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2009/7/30/ColdFusion-9-cfgrid-with-ORM-Part-2--Full-CRUD-Grid</link>
				<description>
				
				&lt;p&gt;Previously I &lt;a href=&quot;http://www.coldfusion-ria.com/Blog/index.cfm/2009/7/21/ColdFusion-9-cfgrid-with-ORM-Part-1&quot; target=&quot;_blank&quot;&gt;blogged&lt;/a&gt; on getting a normal cfgrid running with ColdFusion. This post will look at expanding that to a full CRUD grid using ORM.&lt;/p&gt;
&lt;p&gt;
In addition to ColdFusion, I am also using &lt;a href=&quot;http://jquery.com/&quot; target=&quot;_blank&quot;&gt;jQuery&lt;/a&gt; and &lt;a href=&quot;http://dev.iceburg.net/jquery/jqModal/&quot; target=&quot;_blank&quot;&gt;jqModal&lt;/a&gt;specifically to display the modal boxes. Main reason being that I was itching to do some jQuery stuff.
&lt;/p&gt;
Code follows.&lt;p&gt;
The first thing to be done is add some extra buttons to our paging toolbar for the Add, Edit, Delete functions. Ext JS makes this easy for us. The function gridSmash() is called on page load and it makes our adjustments to the grid.
&lt;/p&gt;
&lt;div id=&quot;codeouter&quot; style=&quot;height: 200px; width: 100%;&quot;&gt;
&lt;code&gt;
function gridSmash()
{
	grid = ColdFusion.Grid.getGridObject(&apos;usersgrid&apos;);
	cols = grid.getColumnModel();
	configA = cols.config;
	//This will add the Row Numbering to our grid
	newcolumn = new Ext.grid.RowNumberer();
	temp = configA.splice(0,0,newcolumn);
	bbar = grid.getBottomToolbar();

	//Add buttons to the paging toolbar
	bbar.add(&apos;-&apos;, {
	pressed: false,
	enableToggle:false,
	text: &apos;Add&apos;,
		icon:&apos;css/add.png&apos;,
	cls: &apos;x-btn-text-icon&apos;,
		handler:addShow
	},
	&apos;-&apos;,{
		pressed: false,
	enableToggle:false,
	text: &apos;Edit&apos;,
		icon:&apos;css/edit.png&apos;,
	cls: &apos;x-btn-text-icon&apos;,
		handler:editShow
	},
	&apos;-&apos;,{
		pressed: false,
	enableToggle:false,
	text: &apos;Delete&apos;,
		icon:&apos;css/delete.png&apos;,
	cls: &apos;x-btn-text-icon&apos;,
		handler:deleteShow
	}
	);
	bbar.doLayout();
}
&lt;/code&gt;
&lt;/div&gt;
We will use the default editing provided in ColdFusion for cfgrid. For that we just need to define the selectMode of the grid to edit and the onChange function for the grid.
&lt;code&gt;
&lt;cfgrid title=&quot;Users&quot; name=&quot;usersgrid&quot; pagesize=&quot;25&quot; format=&quot;html&quot; colheaderbold=&quot;true&quot; colheaderfont=&quot;Verdana&quot; autowidth=&quot;true&quot; deletebutton=&quot;true&quot; colheaderfontsize=&quot;90%&quot; align=&quot;middle&quot; colheaderalign=&quot;center&quot; collapsible=&quot;true&quot;  selectOnLoad=&quot;false&quot; font=&quot;Verdana&quot;	fontsize=&quot;90%&quot; striperows=&quot;true&quot; striperowcolor=&quot;##F0FAFF&quot;
bind=&quot;cfc:Logic.UsersAccess.getUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})&quot; selectMode=&quot;edit&quot; onchange=&quot;cfc:Logic.UsersAccess.editUser({cfgridaction},{cfgridrow},{cfgridchanged})&quot;&gt;

	&lt;cfgridcolumn name=&quot;FirstName&quot; header=&quot;First Name&quot; width=&quot;150&quot;&gt;
	&lt;cfgridcolumn name=&quot;LastName&quot; header=&quot;Last Name&quot; width=&quot;150&quot;&gt;
	&lt;cfgridcolumn name=&quot;UserName&quot; header=&quot;User Name&quot; width=&quot;150&quot;&gt;
	&lt;cfgridcolumn name=&quot;DisplayName&quot; header=&quot;Display Name&quot; width=&quot;150&quot;&gt;

&lt;/cfgrid&gt;
&lt;/code&gt;
The other important part is our UsersAccess.cfc. We add functions to take care of our add, edit and delete functions.
&lt;div id=&quot;codeouter&quot; style=&quot;height: 400px; width: 100%;&quot;&gt;
&lt;code&gt;
&lt;cfcomponent&gt;

&lt;cffunction name=&quot;getUsers&quot; access=&quot;remote&quot; returntype=&quot;any&quot; returnformat=&quot;JSON&quot;&gt;
	&lt;cfargument name=&quot;page&quot; required=&quot;yes&quot;&gt;
      	&lt;cfargument name=&quot;pageSize&quot; required=&quot;yes&quot;&gt;
    	&lt;cfargument name=&quot;gridsortcolumn&quot; required=&quot;yes&quot;&gt;
	&lt;cfargument name=&quot;gridsortdirection&quot; required=&quot;yes&quot; default=&quot;asc&quot;&gt;

	&lt;cfif arguments.gridsortcolumn EQ &quot;&quot;&gt;
		&lt;cfset sortColumn = &quot;ID&quot;&gt;
	&lt;cfelse&gt;
			&lt;cfset sortColumn = arguments.gridsortcolumn&gt;
	&lt;/cfif&gt;
	&lt;cfset sort  = lCase(Arguments.gridsortdirection)&gt;
	&lt;cfset objORMUsers = EntityLoad(&quot;Users&quot;,{},&quot;#sortColumn# #sort#&quot;)&gt;
	&lt;cfset selORMUsers = EntityToQuery(objORMUsers)&gt;

	&lt;cfreturn queryconvertforgrid(selORMUsers,Arguments.page,Arguments.pageSize)/&gt;

&lt;/cffunction&gt;

&lt;!--- Add User to the system. Create a new Entity of User, store our information
and its done. ---&gt;
&lt;cffunction name=&quot;addUser&quot; access=&quot;remote&quot;&gt;
	&lt;cfargument name=&quot;stcForm&quot; type=&quot;struct&quot; required=&quot;true&quot;&gt;

	&lt;cfset newUser = EntityNew(&quot;Users&quot;)&gt;
	&lt;cfset newUser.setFirstName(&quot;#Arguments.stcForm.FirstName#&quot;)&gt;
	&lt;cfset newUser.setLastName(&quot;#Arguments.stcForm.LastName#&quot;)&gt;
	&lt;cfset newUser.setUserName(&quot;#Arguments.stcForm.UserName#&quot;)&gt;
	&lt;cfset newUser.setDisplayName(&quot;#Arguments.stcForm.DisplayName#&quot;)&gt;
	&lt;cfset EntitySave(newUser)&gt;

&lt;/cffunction&gt;

&lt;!--- Delete the selected User. We use the EntityLoad function to return the single object by ID, and then
Delete it ---&gt;
&lt;cffunction name=&quot;delUser&quot; access=&quot;remote&quot;&gt;
	&lt;cfargument name=&quot;delID&quot; type=&quot;numeric&quot; required=&quot;true&quot;&gt;

	&lt;cfset delUser = EntityLoad(&quot;Users&quot;,Arguments.delID,true)&gt;
	&lt;cfset EntityDelete(delUser)&gt;

&lt;/cffunction&gt;

&lt;cffunction name=&quot;editUser&quot; access=&quot;remote&quot;&gt;
	&lt;cfargument name=&quot;gridaction&quot; required=&quot;yes&quot;&gt;
	&lt;cfargument name=&quot;gridrow&quot; required=&quot;yes&quot; type=&quot;Struct&quot;&gt;
	&lt;cfargument name=&quot;gridchanged&quot; required=&quot;yes&quot; type=&quot;Struct&quot;&gt;

	&lt;!--- Get the Primary key for record changed, get the column changed and get the new Value ---&gt;
	&lt;cfset var intRecordID = arguments.gridrow.ID&gt;
	&lt;cfset var colList = StructKeyList(arguments.gridrow)&gt;
	&lt;cfset var col = StructKeyList(arguments.gridchanged)&gt;
	&lt;cfset var newValue = StructFind(arguments.gridchanged,&quot;#col#&quot;)&gt;

	&lt;!--- Load the entity object for the record we need to update ---&gt;
	&lt;cfset objUser = EntityLoad(&quot;Users&quot;,intRecordID,true)&gt;
	&lt;!--- Call the corresponding upd function for the column defined in this cfc ---&gt;
	&lt;cfinvoke method=&quot;upd#col#&quot; objUser=&quot;#objUser#&quot; value=&quot;#newValue#&quot;&gt;

&lt;/cffunction&gt;

&lt;!--- Each of the upd functions will update a corresponding database field when called.
We pass in the User Object that and the accessor functions will do the magic for us ---&gt;
&lt;cffunction name=&quot;updFirstName&quot; access=&quot;private&quot;&gt;
	&lt;cfargument name=&quot;objUser&quot; type=&quot;Any&quot; required=&quot;yes&quot;&gt;
	&lt;cfargument name=&quot;value&quot; type=&quot;String&quot; required=&quot;yes&quot;&gt;

	&lt;cfset objUser.setFirstName(Arguments.value)&gt;

&lt;/cffunction&gt;

&lt;cffunction name=&quot;updLastName&quot; access=&quot;private&quot;&gt;
	&lt;cfargument name=&quot;objUser&quot; type=&quot;Any&quot; required=&quot;yes&quot;&gt;
	&lt;cfargument name=&quot;value&quot; type=&quot;String&quot; required=&quot;yes&quot;&gt;

	&lt;cfset objUser.setLastName(Arguments.value)&gt;

&lt;/cffunction&gt;

&lt;cffunction name=&quot;updUserName&quot; access=&quot;private&quot;&gt;
	&lt;cfargument name=&quot;objUser&quot; type=&quot;Any&quot; required=&quot;yes&quot;&gt;
	&lt;cfargument name=&quot;value&quot; type=&quot;String&quot; required=&quot;yes&quot;&gt;

	&lt;cfset objUser.setUserName(Arguments.value)&gt;

&lt;/cffunction&gt;

&lt;cffunction name=&quot;updDisplayName&quot; access=&quot;private&quot;&gt;
	&lt;cfargument name=&quot;objUser&quot; type=&quot;Any&quot; required=&quot;yes&quot;&gt;
	&lt;cfargument name=&quot;value&quot; type=&quot;String&quot; required=&quot;yes&quot;&gt;

	&lt;cfset objUser.setDisplayName(Arguments.value)&gt;

&lt;/cffunction&gt;

&lt;/cfcomponent&gt;
&lt;/code&gt;
&lt;/div&gt;

The full source has all the code, including all the jqModal things going on, stylesheets, etc. &lt;a href=&quot;http://www.coldfusion-ria.com/Downloads/CFGrid_ORM_2.zip&quot;&gt;Download It&lt;/a&gt;.

Update: ORM Demos are currently Unavailable.
				</description>
				
				<category>Web Development</category>
				
				<category>ColdFusion 9</category>
				
				<category>jQuery</category>
				
				<pubDate>Thu, 30 Jul 2009 14:35:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2009/7/30/ColdFusion-9-cfgrid-with-ORM-Part-2--Full-CRUD-Grid</guid>
				
				
			</item>
			
			<item>
				<title>Quick Tip : When Working with jQuery and jqModal</title>
				<link>http://www.coldfusion-ria.com/Blog/index.cfm/2009/7/26/Quick-Tip--When-Working-with-jQuery-and-jqModal</link>
				<description>
				
				This has stumped me twice, so best thought to make a blog post, for my own records and also for anybody who gets stuck at the same place.
&lt;p&gt;
Over the weekend, I have been working with jQuery and specifically jqModal for a full fledged CRUD Grid using ORM. For some of the alerts/forms I was using jqModal to show them. Everything worked fine on Firefox, but IE8 had issues. After an hour or so of searching, I realized that I had faced a similar issue when working with jqModal on IE before.&lt;/p&gt;
&lt;p&gt;
The problem is that since I do not wirte a lot of HTML in my day to day coding, I generally omit the DOCTYPE sepcification from my pages. This causes interesting issues on IE. So, the solution was to specify the DOCTYPE and everything was working smoothly in IE too. My DOCTYPE specification that solved these issues was:
&lt;/p&gt;
&lt;code&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;/code&gt;
&lt;p&gt;
See the difference:&lt;br/&gt;
&lt;a href=&quot;http://coldfusion-ria.com/Test/KSPersonal/jquery/jqModal_nodoctype.cfm&quot; target=&quot;_blank&quot;&gt;DOCTYPE NOT Present&lt;/a&gt;
&lt;br/&gt;
&lt;a href=&quot;http://coldfusion-ria.com/Test/KSPersonal/jquery/jqModal_yesdoctype.cfm&quot; target=&quot;_blank&quot;&gt;DOCTYPE Present&lt;/a&gt;
&lt;/p&gt;
				</description>
				
				<category>Web Development</category>
				
				<category>jQuery</category>
				
				<pubDate>Sun, 26 Jul 2009 19:26:00 -0500</pubDate>
				<guid>http://www.coldfusion-ria.com/Blog/index.cfm/2009/7/26/Quick-Tip--When-Working-with-jQuery-and-jqModal</guid>
				
				
			</item>
			</channel></rss>
