cffileupload Tag - Uploading Multiple Files

Back in beta, I had made a post 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.

Demo currently unavailable

Lets take a look at how simple the code is

[More]

cffileupload Tag - Event Handlers

Continuing with exploring the new multi-file upload tag functionality in ColdFusion 9, this post will build on the previous post and add event handlers. We are able to work with 3 event handlers:

  1. onComplete - Called after each file finishes uploading
  2. onError - Called when a file upload errors out
  3. onUploadComplete - Called when all the files finish uploading
Demo currently unavailable.

Lets take a look at the code.

[More]

Installing ColdFusion 9 64-but on Windows 7 64-bit Experience

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't really provide any documentation on what you need to do to install CF properly on IIS 7.5. There is no, "verify these windows component are installed" 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, "Press OK to start CF Admin", 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 "OK" at the end. Out comes the CF Admin page, "Click here" 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'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'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'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'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'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'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'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.

ExtJS 3.0 Editor Grid with ColdFusion + Ext Toolbar Play

I hadn't looked at the Ext JS 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.

View the Demo

And as always, time to look at the code.

[More]

Using jQuery based jqGrid with ColdFusion Revisited: Full CRUD grid with Advanced Searching

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 jqGrid 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 earlier blog post on a full CRUD grid and update it to 3.6 specifications.


This implementation uses the following jqGrid features:

  1. Inbuilt Form based Add, Edit, Delete and Search functionality
  2. Search is done using new Multiple Search feature
  3. Exploration of a few additional colModel parameters

View the Demo : this is all realtime, any updates made will be reflected in the grid.
Now, lets look at the code

[More]

Registration for CFinNC Conference Open (Free ColdFusion based Conference)

I am personally from Charlotte, so when the CFinNC 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.

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.

So head on over to cfinnc.com and register for it.

jqGrid 3.5 with jQuery UI ThemeRoller Themes Demos

jqGrid 3.5 was released yesterday. It includes lots of good features, including a new rendering engine for faster loading. It also now supports jQuery UI ThemeRoller themes, so to start off itself you have access to variety of styles and can create your own easily too.

So I went ahead and created a demo that shows the grid in all these themes.
View Demo

How I did this style selection switch, follows

[More]

ColdFusion 9 cfgrid with ORM: Part 2 - Full CRUD Grid

Previously I blogged on getting a normal cfgrid running with ColdFusion. This post will look at expanding that to a full CRUD grid using ORM.

In addition to ColdFusion, I am also using jQuery and jqModalspecifically to display the modal boxes. Main reason being that I was itching to do some jQuery stuff.

Code follows.

[More]

Adding Ext JS Buttons to ColdFusion 9 cfgrid Paging Toolbar

Just a quick post about how to go about adding custom buttons to the cfgrid's paging toolbar. I believe this has changed from Ext 1.1 (which ColdFusion 8 implements) to Ext 3.0 (which ColdFusion 9 implements).

You can see the normal cfgrid here. It comes with no buttons, and it as such with a grid implementation it would suit us if we could show add/edit/delete buttons.

So, you can get your pretty icons and add some nice buttons to the grid allowing users to perform operations. I have one up with an add button.

Code follows

[More]

ColdFusion 9's ORM Entity Load Functions

Update: Demo is currently unavailable.

This is a blog post, mainly so I have a good single place to refer the many varities of EntityLoad() functions available in ColdFusion 9. EntityLoad() is the main method you will be using to retreive objects for your persistent CFCs.

Demo currently unavailable.

view plain print about
1<cfscript>
2    ormreload();
3    import Logic.*;        
4
</cfscript>
5
6<div id="ex1" class="hidden">        
7    <cfset arrAllUsers = EntityLoad("Users")>
8    
9</div>
10
11<div id="ex2" class="hidden">
12    
13    <cfset arrFiveUsers = EntityLoad("Users",{},{maxResults=5})>
14        
15    <cfdump var="#arrFiveUsers#">
16</div>
17
18<div id="ex3" class="hidden">
19    
20    <cfset arrUniqueUser = EntityLoad("Users",228)>
21        
22    <cfdump var="#arrUniqueUser#">
23</div>
24
25<div id="ex4" class="hidden">
26    <cfset objUniqueUser = EntityLoad("Users",228,true)>
27            
28    <cfdump var="#objUniqueUser#">
29</div>
30
31<div id="ex5" class="hidden">
32    
33    <cfset objFilteredUser = EntityLoad("Users",{FirstName="User FN 1", LastName="User LN 1"},true)>
34    
35    <cfdump var="#objFilteredUser#">
36</div>
37
38<div id="ex6" class="hidden">
39    
40    <cfset arrFilteredUser = EntityLoad("Users",{FirstName="User FN 4000"})>
41        
42    <cfdump var="#arrFilteredUser#">
43    
44</div>
45
46<div id="ex7" class="hidden">
47            
48    <cfset arrSortedUser = EntityLoad("Users",{},"FirstName asc",{maxResults=5})>
49                
50    <cfdump var="#arrSortedUser#">
51</div>
52
53<div id="ex8" class="hidden">
54    <cfset arrSortedUser2 = EntityLoad("Users",{},"LastName asc, FirstName desc",{maxResults=2})>
55        
56    <cfdump var="#arrSortedUser2#">
57</div>

And there you have it folks.

More Entries

/* ChartBeat Testing */