We wanted to convert our existing application to coldbox platform one by one.
I have created a project from your link.
mkdir coldbox-legacy-app-demo --cd install bdw429s/coldbox-legacy-app-demo server start
/**********************************************************************************Copyright from 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp*********************************************************************************/component extends='coldbox.system.Bootstrap'{ this.mappings["/coldbox"] = 'C:\inetpub\wwwroot\coldboxbackup\coldbox';
public boolean function onRequestStart(String targetPage){ // Map physical files to events // This will allow the old URL for the about page to remain unchanged from the URL. // This is just an example to show how to do this in case you CAN'T break book marks. // Of course, URL rewriting wold also be a valid way to solve this too.
fileEventMap=StructNew();
fileEventMap = { '/coldboxbackup/about.cfm':'main.about', '/coldboxbackup/products/coldbox.cfm':'products.coldbox'
};
if(StructKeyExists(fileEventMap,arguments.targetPage ) || ( arguments.targetPage == '/coldboxbackup/index.cfm')) {
if( StructKeyExists(fileEventMap,arguments.targetPage ) ) { url.event= fileEventMap[arguments.targetPage]; }
// Verify ColdBox is loaded reloadChecks();
processColdBoxRequest(); // Returning false prevents the legacy code from also kicking in return false; }
// Else proceed to legacy code return true; }
}
if( NOT event.isNoExecution() )
{
refResults.results = cbController.runEvent( defaultEvent=true ); }
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/ed517ee8-70ad-4f8b-99e7-30cd34c409c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.