Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Bradley Wood / Bradley Wood (Bradley Wood)
Created: 02/25/2014
Components: Application Deployment
Versions: 11.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: PublicBeta /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Platforms All
Vote Count: 0
It is difficult to add app mappings outside of the actual Application.cfc file. The information is available here:
getPageContext().getFusionContext().getApplicationCustomMappings()
When there are no app mappings, this is null.
Provide a built in function to access the struct of app mappings so developers can modify them as necessary to add additional mappings on the fly based on installed packages, etc.
There is a rather specific use case for this in the ColdBox framework that I can expand on it you're curious.
Also, an alternative method of solving this is already implemented in Railo. The cfapplication tag has an action of "update" which can be used to update ANY application setting in your app. That would also be a good solution and it looks like this:
// Add an app mapping on-the-fly in Railo:
var mappings = getApplicationSettings().mappings;
mappings[ name ] = path;
application action='update' mappings='#mappings#';
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3713264
External Customer Info:
External Company:
External Customer Name: bradwood.com
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: