Tuesday, January 30, 2007
ORM stands for object relational Mapping. I am not sure I understand everything it does yet but I do know that it automatically creates CRUD DAO objects. I use to spend hours writing beans, DAO's and gateways. Well, Transfer does the beans and DAO's automatically and even some of the simple gateway queries.
Previously I had been using http://rooibos.maestropublishing.com/ to generate beans and then I would cut and past generic DAO code for the CRUD methods. CRUD stands for Create-Read-Update-Delete. The standard things you do to an "object" or row in a database.
Setup is probably the most difficult, as anything else, especially the first time you attempt it. In Transfer you have to download the open source code from: http://www.compoundtheory.com/?action=transfer.download or you can get the latest BER (Bleeding Edge Release) via SVN at http://svn.riaforge.org/transfer .
You place this code in your root directory. You will then have a "transfer" directory under web root.
you need to initialise the transfer object, which I did for my test in my application.cfc file. You can just do it on a page if you want. You can get further instructions here: http://www.compoundtheory.com/?action=displayPost&ID=112. This page also offers examples of using Transfer for the basic CRUD operations.
Once you define your datasource and your table in datasource.xml and transfer.xml. It is this easy to get a row from the database:
transfer.get("user.user", userid).
Want a query of all users:
transfert.list("user.user")
It took me about as much time to figure out how to use the basics of transfer as it would have to generate all the DAO, Bean and simple Gateway methods for 1, maybe 2 projects, but now I can save my self tons of time not having to create those anymore.
I am amazed at the creators of such "frameworks" as transfer. They are wicked smart and provide a real value to me. Thanks to Mark Mandel and any others who devote their time and smarts.
Wednesday, January 17, 2007
Invalid Color Space error in Acrobat Reader
Tuesday, January 09, 2007
You can host your email for free using google Apps for your domain. This is awesome. You set up an account, point your MX DNS record for your domain as per the instructions and wallah! Google handles all your email for you and your users.
I set up one of my domains to use it and it works great. It did take one of my networks 3 days to get the dns changes but when it kicked in it worked just as I hoped. Check out the benefits:
Google Apps for your Domain
The have a few other things than just email, and I am sure they will add more.
There are a couple of downsides to this. Your email is hosted outside your company. I currently don't have a way to connect to gmail using CFMAIL.
The upsides are huge though. They take care of software, bandwidth, spam filtering, administering etc.. Lots of reasons to take advantage of this.
Friday, January 05, 2007
Interesting article about run command you can issue in windows. As it states, most are available via the GUI interface of windows, but there are some nifty ones that you may find usefull.
http://www.fixmyxp.com/content/view/20/42/
Several times I have thought about finding a subversion host online, but the meager attempts I made were not succesfull. But I came across one a few days ago and took the plunge. It was a peice of cake. For testing I started a new project. I just sent support and email about importing the existing project I had. Everything is the same. Only know I don't have to worry about backups of my code and updates of the subversion software. And best of all I can access the code from my latpop at home or wherever. It is $15.00 a month. I price I feel is fair. I had I small issue I sent to tech support and the resonded very quickly
So far so good. The site:
http://www.wush.net/
http://www.siteground.com
http://msmvps.com/blogs/kwsupport/archive/2004/11/03/17830.aspx
Tuesday, January 02, 2007
insert into options (name, value, descriptio, category) values ('Default Suppress Receipt','Y','The default Suppress Receipts option for new customers.','Customer Defaults')
This worked, but not until I deleted to old incorrect value out of the options table. I also restarted platypus. One of those two things made it work.
This gave me the idea for another field also. On my own I did the following:
insert into options (name, value, descriptio, category) values ('Default Suppress Statements','I','The default Suppress Statements option for new customers.','Customer Defaults')
This now enters the correct default value for the Suppress Statements field. I am not positive how it works, but it appears that you can add a row to the options table to cause default values. Just have to use the word "Default" in front of the actual field name. Should work for any field, at least on the general tab.
Friday, December 22, 2006
The highlight was at the beginning when volunteers from Nellis Air Force base rolled out a football field size American Flag. Then the during the National Anthem, 2 air force jets flew over and hit the afterburners right above us. COOL! Definately the highlight of the evening. I want to take my boys next year so they can experience this.
Wednesday, December 13, 2006
function
checkValue(){if (document.getElementById('valuation ').value >= 1000000){
if (confirm("This value is over $1,000,000. Are you sure you meant to enter such a large value?")){
}
else {
document.getElementById('valuation').focus();
}
return false;
}
}
I was able to set focus to any field, except the one I just came from. The only hack I was able to find was to set focus first to another field, then the field I came from and then use the follwing in my <input> statement.
onFocus="this.select()"
Here is the javascript function I had to use:
function
checkValuation(){if (document.getElementById('valuation').value >= 1000000){
if (confirm("This value is over $1,000,000. Are you sure you meant to enter such a large value?")){
}
else {
document.getElementById('otherfield').focus();
document.getElementById('valuation').focus();
}
return false;
}
}
David Mineer
Tuesday, December 12, 2006
http://www.verizonwireless.com/backupassistant
It does const $1.99 a month. But as often as I drop phones in a glass of milk, it is worth it to me.
Anyway, I started researching this and came to find out that I could not run the goldmine executable which is on a network share, from the machine running my iGoldmine server. The iGoldmine server is W2K 2003 server and is just a member server of my domain. The error I was getting when trying to run the goldmine executable was:
"windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."
I decided to try and run some other .exe files on different network drives and sure enough, same error on all of them.
Goldmine tech support is usually awesome, but this time they just pooped out on me and had me so mad I had to go get a Dr Pepper to settle down. They didn't want to help at all.
Turns out the issue was with the Internet Explorer Enhanced Security Configuration. You can get to this in Control Panel-Add/Remove Programs/Windows Components/. After that you can check or uncheck the two options: "For administrator Groups" and "For all other user groups". Both were checked, so I unchecked them and then I was able to access files over the network.
I didn't have the same problem logged in as myself. I was able to run those files, other users, however could not and hence the problem. There must have been a windows update that changed the IE config and hence caused this problem. I would have thought the Goldmine folks would have encountered this already, cause it has probably been a month or so.
Friday, November 03, 2006
alert(document.title);
alert(document.body.tagName);
alert(document.location);
Here is the with Statement:
with (document) {
alert(title);
alert(body.tagname);
alert(location);
}
"It is another scope. When you use the with statement, you are forcing the interpreter to not only look up the scope tree for local variables, but you are also forcing it to test each variable against the object specified to see if it's a property" - "Professional Javascript for Web Developers, Nicholas C Zakas, p 581
Monday, October 30, 2006
The solution would normally be to use a /cfif len(fieldname) = 0/ Since this is a dynamic spry region, that doesn't work. I found the solution in the forums:
spry:if examples
My version of the code is:
-span spry:if="'{FIRSTNAME}' != '';"-
Friday, October 27, 2006
Include the following element into the head part of your document:
/script type="text/javascript"/
function noenter() {
return !(window.event && window.event.keyCode == 13); }
/script/
Add the following attribute into each input type="text" tag(s) in your form:
onkeypress="return noenter()"
The function has to go in the header on the page. It didn't work for me putting it in an included .js file.
here is what I want
company1
contact1
contact2
company2
contact3
company3
contact4
contact6
contact7
company4
This is what I have to do for now.
company1 contact1
company1 contact2
company2 contact3
company3 contact4
company3 contact6
company3 contact7
company4
Redundancy and not what I want but it does allow me to go live with the ajax portions of the code and not break the app. We will see what the users think.
In spry however, I cannot figure out how to do it. I can output the list of companies, and I can write an onclick so that when I click on their name, the associated contacts are listed, but I can't list those contacts below the name of the company, I can only create the dynamic region for the contacts outside the company dynamic div.
I am still researching this and hoping to find a workaround. I did notice that there are some posts about grouping the spry forums, but all that is said is that it will be added to the list for future upgrades. This was back in the beginning of August. Maybe there is something available now.
Thursday, October 26, 2006
If you're going to be updating the data set by re-loading the same URL, make sure you turn caching off:
After that, you'll want to define a function callback that will be triggered *after* your server request to update the record:
function UpdateRecordCallback(req)
{
// We just finished updating a record, force myDataSet to
// reload the data from the server so our regions auto update.
myDataSet.loadData();
}
Then use the loadURL() utility function to send your request. You'll have to pass your callback function to loadURL so that it gets called when the request succeeds:
function UpdateMyRecord(recordID)
{
Spry.Utils.loadURL("GET", "closetesrecord.php?id=" + recordID, true, UpdateRecordCallback);
}
...
When you call dynamic fields in a spry dynamic region you format them like this: {FIELDNAME}. So I had an href like this:
Firefox had no problem with this. IE, however, was having a problem and I couldn't figure it out. Finally figured out that I had to have single quotes around the spry dynamic vars like this:
That was only needed inside the onclick event, not outside. Small thing and the error didn't seem to effect the functionality, but you hate for users to get the little error each time the page loads. Makes everything seem just not right.
http://ajaxian.com/archives/ajax-ie-caching-issue
Of course I am using cold fusion and the answer was to put the following line at the top of my xml page.
I spent several hours trying different things. I had just upgraded to ie 7 and thought that could have been part of the problem. It was working just great in firefox. Glad it was an easy fix, wish I would have figured it out quicker.
I am using the adobe spry framework for AJAX. It is still in prerelease but I have really enjoyed it as it is my first serious foray into AJAX.