Code Depot
This page has a listing of contributed plugins, interceptors and more until the ColdBox website supports it. If you have any ColdBox material that you would like to share with the community, please send them to info@… with a description, a license type, and the zip file of your content and it will be posted here.
Official ColdBox Custom Plugins
The plugins offered below are developed by Team ColdBox and are supported as such.
GroovyLoader
The GroovyLoader plugin is distributed as part of the projects pack in the extra downloads section of ColdBox as it includes a mini sample application to show how the plugin works. This plugin was inspired by the great work of Barney Boisevert and his CFGroovy project. As of now this plugin supports the following:
- Load a groovy environment (1.6.0) into any ColdBox application without modifying the running CF engine
- Choosing of a directory that will hold groovy classes/scripts: configureClassPath().
- Integration with the ColdBox cache to provide resolution of parsed java classes for all parsed groovy source, including custom source executions
- Ability to clean the parsed class cache from the ColdBox cache
- Ability to clean the groovy classloader cache of parsed bits
- Ability to handle complex groovy/java relationships
- Ability to load any jar or classes, just by adding your jar/class files to the GroovyLoader lib directory. This leverages the usage of the JavaLoader plugin to class load at runtime.
- Easily extend/decorate the plugin to meet your needs or enhance it
- Create groovy classes: create(clazz)
- Execute groovy scripts: runScript(scriptName,varCollection)
- Execute groovy source code: runSource(scriptSource,varCollection)
- Execute groovy source code using a custom tag import
- Groovy scripts and source code executions will be binded with the following variables. This means that the groovy scripts that are executed using runScript() and runSource() will have the following variables IMPLICITLY created at runtime:
- A custom passed structure called varCollection. This can have anything you like.
- The coldbox request collection: coldbox_rc
- The following coldfusion variables:
- cf_pagecontext : The coldfusion pagecontext object
- cf_application : The coldfusion application scope
- cf_server : The coldfusion server scope
- cf_session : The coldfusion session scope (if available)
Init the plugin
<cffunction name="onAppInit" access="public" returntype="void" output="false"> <cfargument name="Event" type="any"> <!--- Init the Groovy Loader ---> <cfset getMyPlugin("GroovyLoader.GroovyLoader").configureClassPath(getSetting("ApplicationPath") & "model/groovy")> </cffunction>
Handler Code Samples:
<cfcomponent name="groovy" hint="My groovy handler" output="false" extends="coldboxy.system.EventHandler"> <!--- dependencies ---> <cfproperty name="groovyLoader" type="coldbox:myplugin:GroovyLoader.GroovyLoader" /> <!--- Import Groovy Scripting ---> <cfimport prefix="groovy" taglib="../plugins/GroovyLoader/tags" /> <!--- runTagSource ---> <cffunction name="runTagSource" access="public" returntype="void" output="false" hint=""> <cfargument name="Event" type="any" required="yes"> <cfset var rc = event.getCollection()> <!--- Place Date ---> <cfset rc.today = now()> <!--- Groovy Script ---> <groovy:script> <cfoutput> def today = coldbox_rc["today"] def SubjectLine = ["Hello","my","name","is","Luis Majano.","Expressed at",today] //Place in ColdBox event context coldbox_rc["SubjectLine"] = SubjectLine.join("_") </cfoutput> </groovy:script> <cfset event.setView("runTagSource")> </cffunction> </cfcomponent>
Sample Method Calls
//create a groovy class called Hello.groovy rc.oHello = getMyPlugin("GroovyLoader.GroovyLoader").create("Hello"); //Run a script called Test.groovy getMyPlugin("GroovyLoader.GroovyLoader").runScript('Test',rc.varCollection); //Run dynamic source var source = "varCollection.GroovyArray = [1,2,3,4]"; rc.varCollection = {createdAt=now()}; getMyPlugin("GroovyLoader.GroovyLoader").runSource(source,rc.varCollection);
System Requirements
- ColdBox 2.6.2 and above
- Railo 3.0 and above
- Adobe ColdFusion 8.0 and above
FileWriter
Uses the Java FileOutputStream, OutputStreamWriter, and BufferedWriter to provide a way to GREATLY increase performance of file output. Must faster and less resource intensive than trying to build large strings and perform fewer CFFILE append actions. Also less memory intensive than putting strings into an array and then performing a listToArray() call.
- Author: Luis Majano & Greg Lively
- License: Apache 2
- Download : http://www.coldboxframework.com/downloads/depot/plugins/pluginpack.zip
cfengine
A cool utility that let's you know which flavor of ColdFusion and what version you are running on. It also has a set of public properties for you to do testing to.
- Author: Luis Majano
- License: Apache 2
- Download : http://www.coldboxframework.com/downloads/depot/plugins/pluginpack.zip
paging
A very cool and simple to use paging plugin. It can create a paging carousel for any recordset or array or whatever you want to page. Instructions are located inside of the plugin.
- Author: Luis Majano
- License: Apache 2
- Download : http://www.coldboxframework.com/downloads/depot/plugins/pluginpack.zip
diff
Another cool plugin to help you create differences between files, strings or arrays. This plugin is used by the [Codex Wiki] to create wiki pages diffs.
- Author: Luis Majano & Original code by Rick Osborne
- License: Apache 2 & Creative Commons
- Download : http://www.coldboxframework.com/downloads/depot/plugins/pluginpack.zip
ClusterStorage
A great storage plugin for Railo's cluster scope. You can now easily talk to any servers in a cluster with this nifty plugin.
- Author: Sana Ullah
- License: Apache 2 & Creative Commons
- Download : http://www.coldboxframework.com/downloads/depot/plugins/pluginpack.zip
Official Interceptors
The interceptors offered below are developed by Team ColdBox and are supported as such. Please download at your own risk, they are offered "As Is".
Third Party Plugins
The plugins offered below are contributed to the ColdBox project and are therefore maintained by those authors and not the ColdBox effort. Please download at your own risk, they are offered "As Is".
Captcha
CFImage CAPTCHA Plugin.
- Author: Tony Garcia
- Detail: http://www.objectivebias.com/blog/entry/a-simple-cfimage-captcha-plugin-for-coldbox
- Download : http://www.objectivebias.com/blog/assets/content/files/captchaplugin.zip
toXML
Set of utility functions to generate XML.
- Author: Ray Camden & Sana Ullah
- License: Apache 2
- Download : http://www.coldboxframework.com/downloads/depot/plugins/toXML.cfc.zip
Spry Plugin
A great plugin for Adobe Spry and the ColdBox Framework.
- Author: Ernst van der Linden
- License: Apache 2
- Live Demo
- Site : http://evdlinden.behindthe.net
- Download : http://evdlinden.behindthe.net/codedepot/sprysample%202.0.zip
JS Calendar Plugin
A great JS Calendar plugin for the ColdBox Framework.
- Author: Ernst van der Linden
- License: Apache 2
- More Detail
- Site : http://evdlinden.behindthe.net
- Download : http://evdlinden.behindthe.net/codedepot/jsCalendarCBPlugin.zip
Webcharts3D Plugin
A great plugin for WebCharts3D and the ColdBox Framework. WebCharts3D is included in ColdFusion.
- Author: Ernst van der Linden
- License: Apache 2
- Site: http://evdlinden.behindthe.net
- Download : http://evdlinden.behindthe.net/uploads/webcharts3d/WebCharts3D.zip
- WebCharts3D Manual
- 30 days evaluation Eclipse plugin for WebCharts3D
CSS Graphing Plugin
A great CSS based graphing plugin.
- Author: Russ Johnson
- Site: http://www.angry-fly.com
- Download : http://angry-fly.com/index.cfm/2008/7/23/Simple-CSS-Based-Graphing-Plugin-For-ColdBox
Request Method Plugin
A plugin that allows for POST's only on certain executions.
- Author: Dutch Rapley
- Site: http://dutchrapley.com/
- Download : http://www.coldboxframework.com/downloads/depot/plugins/RequestMethod.zip
I have just written what I feel to be a handy plugin. Right now, it only has one function, and that's the make sure the current request method is POST. It can be conveniently used inside a preHandler() method of an event handler.
<cffunction name="preHandler" output="false" returntype="void" access="public">
<cfargument name="Event" type="coldbox.system.beans.requestContext">
<cfif "confirm,create" CONTAINS event.getCurrentAction()>
<cfset controller.getPlugin('RequestMethod',true).requirePost() />
</cfif>
</cffunction>
ScriptInclude Plugin
The ScriptInclude plug-in was built for the ColdBox Framework to simplify including external stylesheets and JavaScript files. Additionally, ScriptInclude simplifies injecting internal JavaScript into your views and layouts.
- Author: Aaron Greenlee
- Site: http://www.aarongreenlee.com/
- Download : http://www.aarongreenlee.com/mango/post.cfm/new-coldbox-plugin-scriptinclude
Third Party Interceptors
The interceptors offered below are contributed to the ColdBox project and are therefore maintained by those authors and not the ColdBox effort. Please download at your own risk, they are offered "As Is".
Form Inspector Interceptor
When you create form fields with names like:
<input type="text" id="firstName" name="user.firstName" /> <input type="text" id="lastName" name="user.lastName" /> <input type="text" id="email" name="user.email" />
The interceptor will create a 'user' structure in the requestContext. So you can do
getPlugin("beanFactory").populateFromStruct(User, event.getValue('user'));
The advantage is that you can now use your form to group related data together into structures.
- Author: Dutch Rapley
- Site: http://dutchrapley.com/
- Download : http://www.coldboxframework.com/downloads/depot/interceptors/FormInspector.zip
