In a comment on a previous post I wrote about Enhancing CFWindow with JavaScript, Nathan asked the question:

"I like the center feature but if you want to move the window to a little below center what function do you call to center then move it down 20 px?"

The answer is to use the Ext.BasicDialog.center() function, then get the windows Ext.Element object using the Ext.BasicDialog.getEl() function. The Ext.Element object has the getX() and getY() methods, which will give you access to the windows X and Y coordinates. You can use those, in combination with the Ext.BasicDialog.moveTo() function, to move the window to your desired position relative to the center.

[More]

At last nights Orange County ColdFusion Users Group meeting (occfug.org) I presented on the topic of integrating the Google Maps API into a ColdFusion application. I made a custom tag for the presentation that generates a Google API powered map, and I am posting it here for all the people that wanted access to the source code.

[More]

Michael Asked:

"Is there any way to add a minimize button to a CFWindow? "

As a matter of fact, the Ext.BasicDialog object that powers the CFWindow tag does have a "collapsible" configuration option. However, Adobe did not add that as an attribute in the CF8 implementation of CFWindow. They currently have it hard-coded so that all CFWindow generated dialogs are set to "collapsible:false". Hopefully they will add a collapsible attribute to the CFWindow tag in some future release, but until then, adding the Minimize/Maximize button onto the CFWindow tool bar is a fairly painless job with the snippet of JavaScript that you can find below.

[More]

I was working on a project the other day that was using CFGrid to manage some data and there was a button on each row to perform a certain action. However, we didn't want the background color of a row to change when the user clicks on a row or on the button. I created this little javascript that adds a listener to the "beforerowselect" event in the underlying Ext.grid's Row Selection Model and cancels any row selections, preventing the row from being highlighted.

[More]

Several years ago, I had a boss that scolded me for replacing a faulty cat5 network cable between an expensive server and a switch without shutting the server down first. He yelled at me saying "You never unplug ANYTHING from my servers without shutting them down first!!"... then I laughed at him which made him even more furious =). How he got it in his head that it was necessary is beyond me, but it still cracks me up every time I think about it... hee hee... what a knuckle-head. Nonetheless, from that point on, I turned of his computers every time I needed to plug in a mouse, or some USB device, or anything, and then

[More]

When you work for a large company like I do, inevitably, there are going to be at least a few people that march to the beat of a different drummer. Over the years of my professional career, I have worked with "Not-Funny Comedian" guy, "Tries Too Hard to be Everyone's Friend" guy, "Tucks His T-shirts Into His Underwear" guy, "Idiot that Thinks He's a Genius" guy, and various people of that nature (and yes I have used those nick names in actual conversations with my fellow employees). But over the last few months, a new champion has risen to the top of my "Strangest Co-Workers Ever" list. He is known, by many here at the office, as: "Trench Coat Mafia" Guy.

[More]

Today is my birthday. I'm 0011001000111000 binary years old, but I don't feel like I'm a day over 28. Of course, tomorrow that may change, I guess we'll have to wait and see.

The CFWindow tag is built using the Ext.BasicDialog object. This object has several public events that you can add listeners to. You can use the Ext.BasicDialog objects on() function to add listeners to these events that will fire a specific function when the specified event occurs. You can program the listener functions to react as necessary to the various events. Here is a list of the events that you can set up listeners for:

[More]

In a previous post I created a CFC to save simple variables into the session scope. In that CFC I had set up two functions, "SetSessionVar" and "GetSessionVar". However I ended up only needing the "SetSessionVar" function for my example so I never really tested the "GetSessionVar" function. Someone asked me today how to invoke it, and that is when I realized there were a couple little problems that I needed to fix.

[More]

In a previous entry I demonstrated how you can use the underlying Ext framework to enhance your CFWindow. And then Matt left a comment asking if it was possible to dynamically resize the CFWindow. The answer is yes and it's quite easy actually. The CFWindow utilizes the Ext.BasicDialog object which has a function called setContentSize, which resizes the dialog to fit the specified content size.

[More]

More Entries

 
Home | Blog | Contact | © 2001 - 2021 The ColdFusion Guy - Scott Bennett. All rights reserved.