We all know how our users like to partially submit forms and rush through work to "Get the data saved, but come back later to fill the gaps". Right that almost never works. Well here is what you can do to stop form submission by not allowing them to even save the data before they enter it all.
I use this method to run all my validator's highlighting the required fields. As soon as the required fields are populated the "Submit"/"Save" button becomes active.
(right click to view source)
Dec 26, 2008
Dec 23, 2008
Extracting datasource information with CFML ( with javas help )
Ran into this a few days back and I though it was quite interesting. From within CFML code you can extract information about the datasources. I guess a possible use for this is compatible code ie if(mySQL) do MySQL else do MSSQL.
It works with Coldfusion 7 and 8 and it also works on the latest stable release of Railo with slightly less detail then Coldfusion. It didn’t work on Open Bluedragon though.
Original source: Brandon Purcell.
It works with Coldfusion 7 and 8 and it also works on the latest stable release of Railo with slightly less detail then Coldfusion. It didn’t work on Open Bluedragon though.
Original source: Brandon Purcell.
Labels:
CFML,
ColdFusion,
Database,
Java,
Open Blue Dragon,
Railo
Dec 22, 2008
Do I need a 64 bit Operating system?
I have been thinking about this for a while. My current work laptop has 4gig of ram and I only get to see 3.5 ( Vista 32 ) and I feel that I would really like to have that extra 512mb ram. Recently I have been using CS4 a little more and I already run CF8 locally, have Flex Builder open 95% percent of the time, when I don't have local access to my dev SQL server I run VMware image of Win 2003 and SQL 2005 and in the past few weeks I have been
using Dreamweaver 4 a little more aswell. Even with 4gigs ( 3.5 addressable ) ram I still can hear the HDD thrashing.So I am wondering should I take the time to reformat and install Vista 64 and what sort of performance increase/decrease will I see and how many of my current every day apps work work as intended. I'll have to think about this and maybey it will be my New Years resolution to start with a 64bit OS.
Dec 6, 2008
Reverse Proxy in Ubuntu
The last few days I have spend some time setting up 2 new servers. One running Railo on Ubuntu and the other Coldfusion in Windows. I needed to host this on a single IP address and needed both machines available on the internet. There are 2 ways I know of that can accomplish this task 1. Using Microsoft ISA and 2 Using Apache as a reverse proxy. As I already have Apache up and running I went with option 2. While a seemingly trivial task I had never done this before and got hung up a few times the following are the steps I took:
Define the urls you want to re-direct to a different server:
ProxyPreserveHost keeps the host headers intact so the internal sever can still use virtual websites.
Enable the site ( debian/ubuntu specific )
Need some extra bits for apache:
Restart apache
If something isn’t working start looking in the logs:
Define the urls you want to re-direct to a different server:
ServerName www.myExternalDoomianName.com
ProxyPass / http://myInternalDnsName/ ( or ip address )
ProxyPassReverse / http:// myInternalDnsName / (or ip address )
ProxyPreserveHost on
ProxyPreserveHost keeps the host headers intact so the internal sever can still use virtual websites.
Enable the site ( debian/ubuntu specific )
A2ensite myReverseProxySites
Need some extra bits for apache:
apt-get install libapache2-mod-proxy-html
a2enmod proxy
a2enmod proxy_html
a2enmod headers
a2enmod proxy_connect
a2enmod proxy_balancer
Restart apache
/etc/init.d/apache2 restart
If something isn’t working start looking in the logs:
tail -f /var/log/apache2/error.log
Dec 1, 2008
Flex-Data-grids-and-Excel
I write a lot of data-focused applications, a lot of grids, reports updates and inserts. It’s the usual stuff the business wants, Flex and Coldfusion work really well together for this sort of thing. We produce quite a few custom reports using the often unknown little gem that comes for free with cf Coldfusion Report Builder. It can be clunky but I doubt there is a quicker way to produce what we need.
When all this is said and done and we are happy with what we have produced ( and so is the business of course ) they seem to inevitably come back with “This report is great, any chance I can get it in excel?”
As per usual it was required ASAP. We already write out several reports into excel but each report is different and I was after a generic solution. I was directed to this article by Dale Fraser: http://www.cflex.net/showfiledetails.cfm?ObjectID=298
Which didn’t really work and had a few issues not surprising it was for Flex 1. Plus I felt that all the HTML was unnecessary and I was after a cleaner simpler solution. I didn’t want to restrict the use to IE either so the js was to go aswell. What I came up with was a solution that loops the datagrid columns ( hidden and seen ) and produces a tab separated block of text that will paste into excell perfectly separating the grid columns into nice excel columns. It even takes into consideration label functions. The accountants where happy and could now paste into excel with 1 click and manipulate the data in anyway they want.
You can see an example of this where I grab the rss feed from fullasagoog and tidy it up a bit and put it in a grid. Let the grid load up, click copy, open excel, click in a cell and paste. It works on mac and windows ( I’ll assume linux my desktop is at home so I cant test ) in ie, safari and firefox.
http://code.kukiel.net/dgc
I also enabled code view.
When all this is said and done and we are happy with what we have produced ( and so is the business of course ) they seem to inevitably come back with “This report is great, any chance I can get it in excel?”
As per usual it was required ASAP. We already write out several reports into excel but each report is different and I was after a generic solution. I was directed to this article by Dale Fraser: http://www.cflex.net/showfiledetails.cfm?ObjectID=298
Which didn’t really work and had a few issues not surprising it was for Flex 1. Plus I felt that all the HTML was unnecessary and I was after a cleaner simpler solution. I didn’t want to restrict the use to IE either so the js was to go aswell. What I came up with was a solution that loops the datagrid columns ( hidden and seen ) and produces a tab separated block of text that will paste into excell perfectly separating the grid columns into nice excel columns. It even takes into consideration label functions. The accountants where happy and could now paste into excel with 1 click and manipulate the data in anyway they want.
You can see an example of this where I grab the rss feed from fullasagoog and tidy it up a bit and put it in a grid. Let the grid load up, click copy, open excel, click in a cell and paste. It works on mac and windows ( I’ll assume linux my desktop is at home so I cant test ) in ie, safari and firefox.
http://code.kukiel.net/dgc
I also enabled code view.
Subscribe to:
Posts (Atom)