1
1
component {
2
2
variables ._fw1_version = " 4.0.0-snapshot" ;
3
- /*
4
- Copyright (c) 2009-2016, Sean Corfield, Marcin Szczepanski, Ryan Cogswell
3
+ /*
4
+ Copyright (c) 2009-2016, Sean Corfield, Marcin Szczepanski, Ryan Cogswell
5
5
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
9
10
- http://www.apache.org/licenses/LICENSE-2.0
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
11
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- */
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ */
18
18
19
19
this .name = hash ( getBaseTemplatePath () );
20
20
if ( ! structKeyExists ( request , ' _fw1' ) ) {
@@ -252,7 +252,7 @@ component {
252
252
253
253
if ( structKeyExists ( request ._fw1 , ' controllerExecutionStarted' ) ) {
254
254
throw ( type = ' FW1.controllerExecutionStarted' , message = " Controller '#action #' may not be added at this point." ,
255
- detail = ' The controller execution phase has already started. Controllers may not be added by other controller methods.' );
255
+ detail = ' The controller execution phase has already started. Controllers may not be added by other controller methods.' );
256
256
}
257
257
258
258
tuple .controller = getController ( section = section , subsystem = subsystem );
@@ -392,7 +392,7 @@ component {
392
392
393
393
if ( variables .framework .defaultSubsystem == ' ' ) {
394
394
throw ( type = ' FW1.subsystemNotSpecified' , message = ' No subsystem specified and no default configured.' ,
395
- detail = ' When using subsystems, every request should specify a subsystem or variables.framework.defaultSubsystem should be configured.' );
395
+ detail = ' When using subsystems, every request should specify a subsystem or variables.framework.defaultSubsystem should be configured.' );
396
396
}
397
397
398
398
return variables .framework .defaultSubsystem ;
@@ -715,9 +715,9 @@ component {
715
715
try {
716
716
if ( ! structKeyExists ( variables , ' framework' ) ||
717
717
! structKeyExists ( variables .framework , ' version' ) ) {
718
- // error occurred before framework was initialized
719
- failure ( exception , event , false , true );
720
- return ;
718
+ // error occurred before framework was initialized
719
+ failure ( exception , event , false , true );
720
+ return ;
721
721
}
722
722
723
723
// record details of the exception:
@@ -1329,7 +1329,7 @@ component {
1329
1329
* returns the UI generated by the named view
1330
1330
*/
1331
1331
public any function view ( string path , struct args = { },
1332
- any missingView = { } ) {
1332
+ any missingView = { } ) {
1333
1333
var viewPath = parseViewOrLayoutPath ( path , ' view' );
1334
1334
if ( cachedFileExists ( viewPath ) ) {
1335
1335
internalFrameworkTrace ( ' view( #path # ) called - rendering #viewPath #' );
@@ -1389,7 +1389,7 @@ component {
1389
1389
internalFrameworkTrace ( ' building layout queue' , subsystem , section , item );
1390
1390
// look for item-specific layout:
1391
1391
testLayout = parseViewOrLayoutPath ( subsystem & variables .framework .subsystemDelimiter &
1392
- section & ' /' & item , ' layout' );
1392
+ section & ' /' & item , ' layout' );
1393
1393
if ( cachedFileExists ( testLayout ) ) {
1394
1394
internalFrameworkTrace ( ' found item-specific layout #testLayout #' , subsystem , section , item );
1395
1395
arrayAppend ( request ._fw1 .layouts , testLayout );
@@ -1450,7 +1450,7 @@ component {
1450
1450
internalFrameworkTrace ( ' building view queue' , subsystem , section , item );
1451
1451
// view and layout setup - used to be in setupRequestWrapper():
1452
1452
request ._fw1 .view = parseViewOrLayoutPath ( subsystem & variables .framework .subsystemDelimiter &
1453
- section & ' /' & item , ' view' );
1453
+ section & ' /' & item , ' view' );
1454
1454
if ( cachedFileExists ( request ._fw1 .view ) ) {
1455
1455
internalFrameworkTrace ( ' found view #request ._fw1 .view #' , subsystem , section , item );
1456
1456
} else {
@@ -1582,7 +1582,7 @@ component {
1582
1582
for ( var i = 1 ; i <= n ; ++ i ) {
1583
1583
var property = md .properties [ i ];
1584
1584
if ( implicitSetters ||
1585
- structKeyExists ( property , ' setter' ) && isBoolean ( property .setter ) && property .setter ) {
1585
+ structKeyExists ( property , ' setter' ) && isBoolean ( property .setter ) && property .setter ) {
1586
1586
setters [ property .name ] = ' implicit' ;
1587
1587
}
1588
1588
}
@@ -1623,8 +1623,8 @@ component {
1623
1623
writeOutput ( ' <hr /><div id="fw1_trace" style="background: ## ccdddd; color: black; border: 1px solid; border-color: black; padding: 5px; #font #">' );
1624
1624
writeOutput ( ' <div style="#font # font-weight: bold; font-size: large; float: left;">Framework Lifecycle Trace</div><div style="clear: both;"></div>' );
1625
1625
var table = ' <table style="border: 1px solid; border-color: black; color: black; #font #" width="100%">' &
1626
- ' <tr><th style="text-align:right;" width="5%">time</th><th style="text-align:right;" width="5%">delta</th>' &
1627
- ' <th style="text-align:center;">type</th><th width="10%">action</th><th>message</th></tr>' ;
1626
+ ' <tr><th style="text-align:right;" width="5%">time</th><th style="text-align:right;" width="5%">delta</th>' &
1627
+ ' <th style="text-align:center;">type</th><th width="10%">action</th><th>message</th></tr>' ;
1628
1628
writeOutput ( table );
1629
1629
var colors = [ ' ## ccd4dd' , ' ## ccddcc' ];
1630
1630
var row = 0 ;
@@ -1942,7 +1942,7 @@ component {
1942
1942
case ' view' :
1943
1943
folder = variables .viewFolder ;
1944
1944
break ;
1945
- // else leave it alone?
1945
+ // else leave it alone?
1946
1946
}
1947
1947
var pathInfo = { };
1948
1948
var subsystem = getSubsystem ( getSubsystemSectionAndItem ( path ) );
@@ -2268,10 +2268,10 @@ component {
2268
2268
structAppend ( request .context , session [ preserveKeySessionKey ], false );
2269
2269
if ( variables .framework .maxNumContextsPreserved == 1 ) {
2270
2270
/*
2271
- When multiple contexts are preserved, the oldest context is purged
2272
- within getNextPreserveKeyAndPurgeOld once the maximum is reached.
2273
- This allows for a browser refresh after the redirect to still receive
2274
- the same context.
2271
+ When multiple contexts are preserved, the oldest context is purged
2272
+ within getNextPreserveKeyAndPurgeOld once the maximum is reached.
2273
+ This allows for a browser refresh after the redirect to still receive
2274
+ the same context.
2275
2275
*/
2276
2276
structDelete ( session , preserveKeySessionKey );
2277
2277
}
@@ -2389,9 +2389,9 @@ component {
2389
2389
// this will recreate the main bean factory on a reload:
2390
2390
internalFrameworkTrace ( ' setupApplication() called' );
2391
2391
setupApplication ();
2392
- application [variables .framework .applicationKey ] = request ._fw1 .theApp ;
2392
+ application [variables .framework .applicationKey ] = request ._fw1 .theApp ;
2393
2393
2394
- }
2394
+ }
2395
2395
2396
2396
private void function setupFrameworkDefaults () {
2397
2397
if ( structKeyExists ( variables , " _fw1_defaults_initialized" ) ) return ;
@@ -2585,19 +2585,19 @@ component {
2585
2585
if ( ! structKeyExists ( variables .framework , ' diComponent' ) ) {
2586
2586
var diComponent = ' framework.ioc' ;
2587
2587
switch ( variables .framework .diEngine ) {
2588
- case ' aop1' :
2589
- diComponent = ' framework.aop' ;
2590
- break ;
2591
- case ' wirebox' :
2592
- diComponent = ' framework.WireBoxAdapter' ;
2593
- break ;
2594
- case ' custom' :
2595
- throw ( type = " FW1.IllegalConfiguration" ,
2596
- message = " If you specify diEngine='custom' you must specify a component path for diComponent." );
2597
- break ;
2598
- default :
2599
- // assume DI/1
2600
- break ;
2588
+ case ' aop1' :
2589
+ diComponent = ' framework.aop' ;
2590
+ break ;
2591
+ case ' wirebox' :
2592
+ diComponent = ' framework.WireBoxAdapter' ;
2593
+ break ;
2594
+ case ' custom' :
2595
+ throw ( type = " FW1.IllegalConfiguration" ,
2596
+ message = " If you specify diEngine='custom' you must specify a component path for diComponent." );
2597
+ break ;
2598
+ default :
2599
+ // assume DI/1
2600
+ break ;
2601
2601
}
2602
2602
variables .framework .diComponent = diComponent ;
2603
2603
}
@@ -2793,8 +2793,8 @@ component {
2793
2793
try {
2794
2794
var paramPairs = listToArray ( body , " &" );
2795
2795
for ( var pair in paramPairs ) {
2796
- var parts = listToArray ( pair , " =" , true ); // handle blank values
2797
- request .context [ parts [ 1 ] ] = urlDecode ( parts [ 2 ] );
2796
+ var parts = listToArray ( pair , " =" , true ); // handle blank values
2797
+ request .context [ parts [ 1 ] ] = urlDecode ( parts [ 2 ] );
2798
2798
}
2799
2799
} catch ( any e ) {
2800
2800
throw ( type = " FW1.JSONPOST" ,
@@ -2902,7 +2902,7 @@ component {
2902
2902
// check for forward and backward slash in the action - using chr() to avoid confusing TextMate (Hi Nathan!)
2903
2903
if ( findOneOf ( chr (47 ) & chr (92 ), action ) > 0 ) {
2904
2904
throw ( type = ' FW1.actionContainsSlash' , message = " Found a slash in the action: '#action #'." ,
2905
- detail = ' Actions are not allowed to embed sub-directory paths.' );
2905
+ detail = ' Actions are not allowed to embed sub-directory paths.' );
2906
2906
}
2907
2907
return action ;
2908
2908
}
@@ -2913,7 +2913,7 @@ component {
2913
2913
// the exception we actually want to throw!
2914
2914
param name = " request.missingView" default = " <unknown.view>" ;
2915
2915
throw ( type = ' FW1.viewNotFound' , message = " Unable to find a view for '#request .action #' action." ,
2916
- detail = " '#request .missingView #' does not exist." );
2916
+ detail = " '#request .missingView #' does not exist." );
2917
2917
}
2918
2918
2919
2919
}
0 commit comments