Skip to content

Instantly share code, notes, and snippets.

View cameroncf's full-sized avatar

Cameron Childress cameroncf

  • Sumo Consulting
  • Atlanta, GA
View GitHub Profile
@cameroncf
cameroncf / gist:4170846
Created November 29, 2012 18:09
Can't assign requested address
Can't assign requested address
ColdFusion cannot determine the line of the template that caused this error. This is often caused by an error in the exception handling subsystem.
Resources:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11
Remote Address 127.0.0.1
@cameroncf
cameroncf / gist:4974631
Last active December 13, 2015 21:08
In a Mura Plugin, drop this in [plugin]/includes/eventHandler.cfc:onApplicationLoad() to load plugin specific extension sets at application startup
local.rsSites = arguments.$.getBean('settingsManager').getList(); // all sites
local.rsPlugin = arguments.$.getBean('pluginManager').getPlugin( variables.framework.package ); // plugin record
local.pluginAssignments = arguments.$.getBean('pluginManager').getAssignedSites( local.rsPlugin.moduleID ); // recordset of sites this plugin belongs to
local.pluginXML = arguments.$.getBean('pluginManager').getPluginXML( local.rsPlugin.moduleID );
// loop assigned sites and make sure they are setup per the plugin requirements
for (site in local.pluginAssignments) {
// make sure all class (defined in plugin/config.xml.cfm) extentions exist
application.configBean.getClassExtensionManager().loadConfigXML( local.pluginXML, site.siteID );
In Permission.cfc:
property name="groups" fieldtype="many-to-many" cfc="Group"
type="array" singularname="Group"
fkcolumn="user_permission_id" inversejoincolumn="user_group_id"
linktable="user_permission_link" inverse="true";
public void function addGroup(required Group group) {
arguments.group.addPermission(this);
}
<form id='myContext'>
<!--- bind property rule to form field --->
<cfset vt.aliasRule(
object = 'address',
property = 'countryCode'
fieldname = 'billingAddressCountry'
context = 'myContext' ) />
<input name="billingAddressCountry" />
@cameroncf
cameroncf / file.cfm
Last active August 29, 2015 13:57 — forked from muracms/file.cfm
<plugin>
...
<ormcfclocation>path/to/entites</ormcfclocation>
...
<plugin>
@cameroncf
cameroncf / gist:9979635
Created April 4, 2014 17:52
Typical SessionFacade
component
output = 'false'
{
public UserFacade function init() output = 'false'
{
//reset();
return this;
}
component
output="false"
{
public SingletonFactory function init()
output = 'false'
{ return this; }
public any function getObject(required String objectName)
output = 'false'
public any function onAdminHTMLFootRender($) {
var str = '';
savecontent variable='str' {
WriteOutput('<script>
jQuery(document).ready(function($){
$(".nav-site-inner .container>ul").append(''<li><a href="/plugins/#variables.framework.package#"><i class="icon-book"></i><span>Your Plugin Name</span></li>'');
});
</script>');
}
return str;
<cffunction access="public" name="qry_ordersGet" output="no" returntype="query">
<cfargument name="orderKeyList" type="string" required="no" default="">
<cfargument name="personKeyList" type="string" required="no" default="">
<cftry>
<cfquery
name="qry_ordersGet"
datasource="#variables.datasource#">
SELECT o.tablePK
,o.tblPeopleFK
component
accessors = true
{
property name='someprop';
public function someMethod() {
error = h[;
}