root / framework / trunk / extensions / lexicon / orm / reactor / list.cfm

Revision 336, 1.1 kB (checked in by scorfield, 2 years ago)

Shuffled all the sample lexicons into the new extensions directory and added the assertions
plugin. This is in preparation for the Fusebox 6 theme are extending through extensibility.
Note that the release script has not been updated so this is a stable BER.

Line 
1<cfscript>
2        // usage:
3        //              <reactor:list
4        //                              object="dbObject"
5        //                              query="cfQueryVar" />
6        if (fb_.verbInfo.executionMode is "start") {
7                // validate attributes
8                // object - string
9                if (not structKeyExists(fb_.verbInfo.attributes,"object")) {
10                        fb_throw("fusebox.badGrammar.requiredAttributeMissing",
11                                                "Required attribute is missing",
12                                                "The attribute 'object' is required, for a 'init' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#.");
13                }
14                // query - string
15                if (not structKeyExists(fb_.verbInfo.attributes,"query")) {
16                        fb_throw("fusebox.badGrammar.requiredAttributeMissing",
17                                                "Required attribute is missing",
18                                                "The attribute 'query' is required, for a 'init' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#.");
19                }
20                // generate code:
21                fb_appendLine('<cfset #fb_.verbInfo.attributes.query# = ' &
22                                'myFusebox.getApplication().getApplicationData().reactorFactory.createGateway("#fb_.verbInfo.attributes.object#").getAll() />');
23                fb_appendLine('<cfset myFusebox.trace("Reactor","Listed Records") />');
24
25        } else {
26        }
27</cfscript>
Note: See TracBrowser for help on using the browser.