Extending Fusebox Verbs: Lexicon Essentials

To extend the capabilities within Fusebox, specifically verb syntax and availability within Fusebox xml namespace, you can use pre-built Custom Lexicons.

The current set of Lexicons makes available the verbs for the following:

  1. Coldfusion
  2. ColdSpring
  3. Reactor
  4. Transfer

Coldfusion Lexicon Verbs

Coldfusion Lexicon Circuit Declaration:

<circuit xmlns:cf="cf/">

abort.cfm

Verb Usage:

<cf:abort/>
<cf:abort showerror="custom error message"/>

case.cfm

Verb Usage:

<cf:switch expression="#someExpr#">
<cf:case value="someValue">
... some code ...
</cf:case>
<cf:case value="anotherValue|andAnother" delimiters="|">
... more code ...
</cf:case>
<cf:defaultcase>
... default code ...
</cf:defaultcase>
</cf:switch>

catch.cfm

Verb Usage:

<cf:try>
... other code ...
<cf:catch type="any">
... exception handler ...
</cf:catch>
</cf:try>

cookie.cfm

Verb Usage:

<cf:cookie name="" value="" expires=""/>

defaultcase.cfm

Verb Usage:

<cf:switch expression="#someExpr#">
<cf:case value="someValue">
... some code ...
</cf:case>
<cf:case value="anotherValue|andAnother" delimiters="|">
... more code ...
</cf:case>
<cf:defaultcase>
... default code ...
</cf:defaultcase>
</cf:switch>

dump.cfm

Verb Usage:

<cf:dump var="#somevariable#" />
<cf:dump label="some label" var="#somevariable#" />

lock.cfm

Verb Usage:

<cf:lock name="myNamedLock" timeout="10" type="exclusive">
... some locked code ...
</cf:lock>
<cf:lock scope="session" timeout="10" type="readonly">
... more locked code ...
</cf:lock>

savecontent.cfm

Verb Usage:

<cf:savecontent variable="bodyContent">
... other code ...
</cf:cfsavecontent>

switch.cfm

Verb Usage:

<cf:switch expression="#someExpr#">
<cf:case value="someValue">
... some code ...
</cf:catch>
<cf:case value="anotherValue|andAnother" delimiters="|">
... more code ...
</cf:case>
<cf:defaultcase>
... default code ...
</cf:defaultcase>
</cf:switch>

throw.cfm

Verb Usage:

<cf:throw/>
<cf:throw type="error type" message="custom error message" detail="more details" />

timer.cfm

Verb Usage:

<cf:timer type="debug" />

trace.cfm

Verb Usage:

<cf:trace text="Just testing this tag" />

try.cfm

Verb Usage:

<cf:try>
... other code ...
<cf:catch type="any">
... exception handler ...
</cf:catch>
</cf:try>

Coldspring Lexicon Verbs

ColdSpring Lexicon Circuit Declaration:

<circuit xmlns:cs="coldspring/">

bean.cfm

Verb Usage:

<cs:initialize coldspringfactory="servicefactory" defaultproperties="default coldspring properties">
<cs:bean beanDefinitionFile="..." />
more bean tags......
</cs:initialize>

get.cfm

Verb Usage:

<cs:get bean="GenericCollection" returnvariable="variables.myCollection"/>
<cs:get bean="GenericCollection" returnvariable="variables.myCollection"
coldspringfactory="servicefactory"/>
<cs:get beanDefinition="GenericCollection"
returnvariable="variables.myBeanDefinition"
coldspringfactory="servicefactory"/>

initialize.cfm

Verb Usage:

<cs:initialize beanDefinitionFile="#expandPath('/config/ColdSpring.xml')#"/>
<cs:initialize beanDefinitionFile="#expandPath('/config/ColdSpring.xml')#"
coldspringfactory="servicefactory"
defaultproperties="default coldspring properties"/>

Reactor Lexicon Verbs

Reactor Lexicon Circuit Declaration:

<circuit xmlns:reactor="reactor/">
[/code]

dao.cfm

Creates a data access object of a given type from Reactor

Verb Usage:

<reactor:dao alias="User" returnvariable="variables.userDAO" />

dictionary.cfm

Creates a dictionary of a given type from Reactor

Verb Usage:

<reactor:dictionary alias="User" returnvariable="variables.userDictionary" />

gateway.cfm

Verb Usage:

<reactor:gateway alias="User" returnvariable="variables.userGateway" />

initialize.cfm

Verb Usage:

<reactor:initialize configuration="#expandPath('/config/Reactor.xml')#"/>

iterator.cfm

Verb Usage:

<reactor:iterator alias="User" returnvariable="variables.userIterator" />

metadata.cfm

Verb Usage:

<reactor:metadata alias="User" returnvariable="variables.userMetaData" />

plugin.cfm

Verb Usage:

<reactor:plugin alias="User" returnvariable="variables.userPlugin" />

record.cfm

Verb Usage:

<reactor:record alias="User" returnvariable="variables.userRecord" />

to.cfm

Verb Usage:

<reactor:to alias="User" returnvariable="variables.userTO" />

validator.cfm

Verb Usage:

<reactor:validator alias="User" returnvariable="variables.userValidator" />

Transfer Lexicon Verbs

Transfer Lexicon Circuit Declaration:

<circuit xmlns:reactor="transfer/">

delete.cfm

Verb Usage:

<transfer:delete bean="thisTask" />

init.cfm

Verb Usage:

<transfer:init
datasource="/config/datasource.xml"
configuration="/config/transfer.xml"
definitions="/output" />

list.cfm

Verb Usage:

<transfer:list object="dbObject" query="cfQueryVar" />

new.cfm

Verb Usage:

<transfer:new object="task" bean="thisTask" populate="true|false" />

parameter.cfm

Verb Usage:

<transfer:parameter name="paramName" value="someVal" />

populate.cfm

Verb Usage:

<transfer:populate bean="thisTask" />

read.cfm

Verb Usage:

<transfer:read object="task" bean="thisTask">
<transfer:parameter name="id" value="#attributes.id#" />
</transfer:read>

save.cfm

Verb Usage:

<transfer:save bean="thisTask" />

Additional Information

Lexicons

External Links