Please note, new blog at http://www.acheron.org/darryl/

Utility methods with application.cfc (updated)

I was mucking around with the application.cfc the other day, and I found the following to be true. If you use the onRequest method, and CFINCLUDE the target page, every method you define within the application.cfc will be copied into the variables scope of the included template. This feature of course has been around for ages (reintroduced with one of the MX updaters I believe). Just recently, Sean Corfield posted a link on the CFCDEV list to the LiveDocs, which explained it in more detail:
If your Application.cfc implements the onRequest method, any utility functions that you define in Application.cfc are also directly available in to the target page, because Application.cfc and the target page share the Variables scope. If your application requires utility functions that are used by multiple pages, not just by the methods in Application.cfc, and you do not use an onRequest method, Macromedia recommends that you put them in a separate CFC and access them by invoking that CFC. As with other ColdFusion pages, Application.cfc can access any CFC in a directory path that is configured on the ColdFusion MX Administrator Mappings page. You can, therefore, use this technique to share utility functions across applications....

By Blogger Unknown, at 7/01/2010 03:31:00 pm  

The article above talked about learning to play with a piano lessons HIGHLANDER and 3 things to expect from this type of piano HIGHLANDER DVD . You will get crisp audio and video guides that make HIGHLANDER DVD COLLECTION easy to watch and re-watch techniques and the exact way to play parts of songs, you'll learn theory with some fun games that take the boring side away from the mathematical side of piano and have the opportunity to learn multiple genres so you can practice exactly what it is you want to learn.


With vivid designs following classical traditions, Tiffany are really attractive in Tiffany bracelets world. And now, go there together and enjoy some of them. The thick bracelets with bone-looking shape, made of silver, can bring about some special feeling for the wearer. silver bracelets formed by pink crystal pearls really makes gentle beauty with romance. Tiffany accessories is the very one for pretty girls with fascinating dreams for true love.



» Post a Comment