Changeset 2106

Show
Ignore:
Timestamp:
03/25/09 23:18:25 (4 years ago)
Author:
lmajano
Message:

lookup manager additions.

Location:
codedepot/trunk/projects
Files:
10 added
6 removed
10 modified
3 copied
2 moved

Legend:

Unmodified
Added
Removed
  • codedepot/trunk/projects/LookupManager/config/StandAloneSettings.xml

    r2104 r2106  
     1<!-- Use the Elements below to merge them into your coldbox.xml --> 
     2 
    13<YourSettings> 
    24        <!-- Lookups Settings --> 
    3         <Setting name="lookups_tables"                          value="{'Roles':'security.Role',  
     5        <!-- 
     6                Sample 
     7                <Setting name="lookups_tables"                          value="{'Roles':'security.Role',  
    48                                                                                                                'Users':'security.User', 
    5                                                                                                                 'Permissions':'security.Permission'}" />                 
     9                                                                                                                'Permissions':'security.Permission'}" /> 
     10        --> 
     11        <Setting name="lookups_tables"                          value="" />              
    612        <Setting name="lookups_imgPath"                         value="includes/lookups/images" /> 
    713        <Setting name="lookups_cssPath"                         value="includes/lookups/styles" /> 
     
    1016        <Setting name="lookups_dsn"                                     value="lookups" /> 
    1117        <!-- Leave empty if handlers and views not in a package --> 
    12         <Setting name="lookups_packagePath"                     value="" /> 
     18        <Setting name="lookups_packagePath"                     value="" />              
    1319</YourSettings> 
    1420 
     
    2127 
    2228<Datasources> 
    23          
    2429        <!-- This is just to load the ORM with the right DSN, retouch as needed --> 
    2530        <Datasource alias="lookups" name="lookups"  dbtype="mysql"  username="" password="" /> 
  • codedepot/trunk/projects/LookupManager/config/coldbox.xml.cfm

    r2104 r2106  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    3         xsi:noNamespaceSchemaLocation="http://www.coldboxframework.com/schema/config_2.6.0.xsd"> 
     2<Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.coldboxframework.com/schema/config_2.6.0.xsd"> 
    43        <Settings> 
    54                <!-- Application Setup--> 
    6                 <Setting name="AppName"                                         value="LookupManager"/> 
     5                <Setting name="AppName" value="LookupManager"/> 
    76                <!-- <Setting name="AppMapping"                                 value=""/> --> 
    8                 <Setting name="OwnerEmail"                                      value="" /> 
    9                 <Setting name="EventName"                                       value="event" /> 
     7                <Setting name="OwnerEmail" value=""/> 
     8                <Setting name="EventName" value="event"/> 
    109                 
    1110                <!-- Security & Dev Modes --> 
    12                 <Setting name="DebugMode"                                       value="false" /> 
    13                 <Setting name="DebugPassword"                           value=""/> 
    14                 <Setting name="ReinitPassword"                          value=""/> 
    15                 <Setting name="EnableDumpVar"                           value="false" /> 
    16                 <Setting name="HandlersIndexAutoReload"         value="true" /> 
    17                 <Setting name="ConfigAutoReload"                value="false" /> 
     11                <Setting name="DebugMode" value="false"/> 
     12                <Setting name="DebugPassword" value=""/> 
     13                <Setting name="ReinitPassword" value=""/> 
     14                <Setting name="EnableDumpVar" value="false"/> 
     15                <Setting name="HandlersIndexAutoReload" value="true"/> 
     16                <Setting name="ConfigAutoReload" value="false"/> 
    1817                 
    1918                <!--Default event name variable to use in URL/FORM etc. --> 
    20                 <Setting name="EnableColdfusionLogging"         value="false" /> 
    21                 <Setting name="EnableColdboxLogging"            value="false" /> 
    22                 <Setting name="ColdboxLogsLocation"                     value="" /> 
    23                 <Setting name="DefaultLogLevel"                         value="4" /> 
     19                <Setting name="EnableColdfusionLogging" value="false"/> 
     20                <Setting name="EnableColdboxLogging" value="false"/> 
     21                <Setting name="ColdboxLogsLocation" value=""/> 
     22                <Setting name="DefaultLogLevel" value="4"/> 
    2423                 
    2524                <!-- Implicit Events --> 
    26                 <Setting name="DefaultEvent"                            value="lookups.display"/> 
    27                 <Setting name="RequestStartHandler"             value=""/> 
    28                 <Setting name="RequestEndHandler"                       value=""/> 
    29                 <Setting name="ApplicationStartHandler"         value=""/> 
    30                 <Setting name="SessionStartHandler"             value=""/> 
    31                 <Setting name="SessionEndHandler"                       value=""/> 
    32                 <Setting name="ExceptionHandler"                        value="" /> 
    33                 <Setting name="onInvalidEvent"                          value="" /> 
     25                <Setting name="DefaultEvent" value="lookups.display"/> 
     26                <Setting name="RequestStartHandler" value=""/> 
     27                <Setting name="RequestEndHandler" value=""/> 
     28                <Setting name="ApplicationStartHandler" value=""/> 
     29                <Setting name="SessionStartHandler" value=""/> 
     30                <Setting name="SessionEndHandler" value=""/> 
     31                <Setting name="ExceptionHandler" value=""/> 
     32                <Setting name="onInvalidEvent" value=""/> 
    3433                 
    3534                <!-- Application Aspects --> 
    36                 <Setting name="EnableBugReports"                        value="false"/> 
    37                 <Setting name="MessageboxStyleOverride"         value="false" /> 
    38                 <Setting name="ProxyReturnCollection"           value="false"/> 
    39                 <Setting name="FlashURLPersistScope"            value="session"/> 
     35                <Setting name="EnableBugReports" value="false"/> 
     36                <Setting name="MessageboxStyleOverride" value="false"/> 
     37                <Setting name="ProxyReturnCollection" value="false"/> 
     38                <Setting name="FlashURLPersistScope" value="session"/> 
    4039                 
    4140                <!-- Extension Points --> 
    42                 <Setting name="CustomErrorTemplate"                     value="" /> 
    43                 <Setting name="UDFLibraryFile"                          value="" /> 
    44                 <Setting name="MyPluginsLocation"               value="" /> 
    45                 <Setting name="HandlersExternalLocation"        value="" /> 
    46                 <Setting name="ViewsExternalLocation"           value="" /> 
    47                 <Setting name="RequestContextDecorator"         value=""/> 
     41                <Setting name="CustomErrorTemplate" value=""/> 
     42                <Setting name="UDFLibraryFile" value=""/> 
     43                <Setting name="MyPluginsLocation" value=""/> 
     44                <Setting name="HandlersExternalLocation" value=""/> 
     45                <Setting name="ViewsExternalLocation" value=""/> 
     46                <Setting name="RequestContextDecorator" value=""/> 
    4847                 
    4948                <!-- Caching Directives --> 
    50                 <Setting name="HandlerCaching"                          value="false"/> 
    51                 <Setting name="EventCaching"                            value="false" /> 
     49                <Setting name="HandlerCaching" value="false"/> 
     50                <Setting name="EventCaching" value="false"/> 
    5251                 
    5352                <!-- Model Integration --> 
    54                 <Setting name="ModelsExternalLocation"          value="" /> 
    55                 <Setting name="ModelsObjectCaching"             value="false" /> 
    56                 <Setting name="ModelsStopRecursion"             value="transfer.com.TransferDecorator" /> 
     53                <Setting name="ModelsExternalLocation" value=""/> 
     54                <Setting name="ModelsObjectCaching" value="true"/> 
     55                <Setting name="ModelsStopRecursion" value="transfer.com.TransferDecorator"/> 
    5756                <!-- Uncomment More Model Integration Settings: 
    5857                        <Setting name="ModelsSetterInjection"           value="false" /> 
     
    6261                 
    6362                <!-- IOC Integration --> 
    64                 <Setting name="IOCFramework"                            value="" /> 
    65                 <Setting name="IOCFrameworkReload"                      value="false" /> 
    66                 <Setting name="IOCDefinitionFile"                       value="" /> 
    67                 <Setting name="IOCObjectCaching"                        value="false" />         
     63                <Setting name="IOCFramework" value=""/> 
     64                <Setting name="IOCFrameworkReload" value="false"/> 
     65                <Setting name="IOCDefinitionFile" value=""/> 
     66                <Setting name="IOCObjectCaching" value="false"/>         
    6867        </Settings> 
    6968         
    7069        <YourSettings> 
    7170                <!-- Lookups Settings --> 
    72                 <Setting name="lookups_tables"                          value="{'Roles':'security.Role',  
    73                                                                                                                         'Users':'security.User', 
    74                                                                                                                         'Permissions':'security.Permission'}" />                 
    75                 <Setting name="lookups_imgPath"                         value="includes/lookups/images" /> 
    76                 <Setting name="lookups_cssPath"                         value="includes/lookups/styles" /> 
    77                 <Setting name="lookups_jsPath"                          value="includes/lookups/js" /> 
    78                 <Setting name="lookups_dsn"                                     value="lookups" /> 
     71                <Setting name="lookups_tables" value=""/>                
     72                <Setting name="lookups_imgPath" value="includes/lookups/images"/> 
     73                <Setting name="lookups_cssPath" value="includes/lookups/styles"/> 
     74                <Setting name="lookups_jsPath" value="includes/lookups/js"/> 
     75                <Setting name="lookups_dsn" value="lookups"/> 
    7976                <!-- Leave empty if handlers and views not in a package --> 
    80                 <Setting name="lookups_packagePath"                     value="" /> 
     77                <Setting name="lookups_packagePath" value=""/> 
    8178        </YourSettings> 
    8279 
     
    8481                <DefaultLayout>Layout.Lookups.cfm</DefaultLayout> 
    8582                <!-- Lookups Layout --> 
    86                 <Layout name="Lookups" file="Layout.Lookups.cfm"> 
     83                <Layout file="Layout.Lookups.cfm" name="Lookups"> 
    8784                        <Folder>lookups</Folder> 
    8885                </Layout> 
     
    9087 
    9188        <Datasources> 
    92                 <Datasource alias="lookups" name="lookups"  dbtype="mysql"  username="" password="" /> 
     89                <Datasource alias="lookups" dbtype="mysql" name="lookups" password="" username=""/> 
    9390        </Datasources> 
    9491         
     
    9693                <!-- USE AUTOWIRING --> 
    9794                <Interceptor class="coldbox.system.interceptors.autowire"> 
    98                         <Property name='enableSetterInjection'>true</Property> 
     95                        <Property name="enableSetterInjection">true</Property> 
    9996                </Interceptor> 
    10097                <!-- USE SES --> 
     
    10299                        <Property name="configFile">config/routes.cfm</Property> 
    103100                </Interceptor> 
    104                 <!-- Transfer Loader --> 
     101                <!-- Transfer Loader : ColdBox 2.6.3 < 
    105102                <Interceptor class="coldbox.system.extras.transfer.TransferLoader"> 
    106103                        <Property name="ConfigPath">/${AppMapping}/config/transfer.xml.cfm</Property> 
     
    110107                        <Property name="BeanInjectorProperties">{'useSetterInjection':'false','stopRecursion':'${ModelsStopRecursion}'}</Property> 
    111108                </Interceptor> 
    112                                                  
     109                --> 
     110                <!-- Transfer Loader : ColdBox 3.0.0 > --> 
     111                <Interceptor class="coldbox.system.orm.transfer.TransferLoader"> 
     112                        <Property name="ConfigPath">/${AppMapping}/config/transfer.xml.cfm</Property> 
     113                        <Property name="definitionPath">/${AppMapping}/config/definitions</Property> 
     114                        <Property name="datasourceAlias">${Datasources.lookups.name}</Property> 
     115                        <Property name="LoadBeanInjector">true</Property> 
     116                        <Property name="BeanInjectorProperties">{'useSetterInjection':'false','stopRecursion':'${ModelsStopRecursion}'}</Property> 
     117                </Interceptor>                           
    113118        </Interceptors> 
    114119         
    115120</Config> 
    116          
  • codedepot/trunk/projects/LookupManager/config/transfer.xml.cfm

    r2089 r2106  
    1 <?xml version="1.0" encoding="UTF-8"?> 
    2 <transfer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="transfer.xsd"> 
    3   <objectCache> 
    4         <defaultcache> 
    5                 <!-- put this in, so it's not so greedy memory wise --> 
    6                 <maxminutespersisted value="30"/> 
    7         </defaultcache> 
    8   </objectCache> 
    9   <objectDefinitions> 
    10         <!--Security Package --> 
    11         <package name="security"> 
     1<?xml version="1.0" encoding="UTF-8"?><transfer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
     2   <objectCache> 
     3      <defaultcache> 
     4         <!-- put this in, so it's not so greedy memory wise --> 
    125 
    13                 <object name="Permission" table="permissions" decorator="lookups.model.security.Permission"> 
    14                         <id name="permissionID" column="permission_id" type="UUID" generate="true"/> 
    15                         <property name="permission" type="string" column="permission"/> 
    16                         <property name="description" type="string" column="description"/> 
    17                 </object> 
     6         <maxminutespersisted value="30"/> 
     7      </defaultcache> 
     8   </objectCache> 
    189 
    19                 <object name="Role" table="roles" decorator="lookups.model.security.Role"> 
    20                         <id name="roleID" column="role_id" type="UUID" generate="true"/> 
    21                         <property name="role" type="string" column="role"/> 
    22                         <property name="description" type="string" column="description"/> 
    23                         <manytomany name="Permission" table="roles_permissions" lazy="true"> 
    24                                 <link column="FKrole_id"                to="security.Role"/> 
    25                                 <link column="FKpermission_id"  to="security.Permission"/> 
    26                                 <collection type="array" /> 
    27                         </manytomany> 
    28                 </object> 
    29  
    30                 <object name="User" table="users" decorator="lookups.model.security.User"> 
    31                         <id name="userID" column="user_id" type="UUID" generate="true"/> 
    32                         <property name="fname" type="string" column="fname"/> 
    33                         <property name="lname" type="string" column="lname"/> 
    34                         <property name="email" type="string" column="email"/> 
    35                         <property name="username" type="string" column="username"/> 
    36                         <property name="password" type="string" column="password"/> 
    37                         <property name="isActive" type="boolean" column="isActive"/> 
    38                         <property name="createDate" type="date" column="create_date" ignore-update="true" refresh-insert="true"/> 
    39                         <property name="modifyDate" type="date" column="modify_date" refresh-update="true"/> 
    40                         <manytoone name="Role"> 
    41                                 <link column="FKrole_id" to="security.Role"/> 
    42                         </manytoone> 
    43                         <manytomany name="Permission" table="user_permissions" lazy="true"> 
    44                                 <link column="FKuser_id"                to="security.User"/> 
    45                                 <link column="FKpermission_id"  to="security.Permission"/> 
    46                                 <collection type="array" /> 
    47                         </manytomany> 
    48                 </object> 
    49  
    50         </package> 
    51  
    52   </objectDefinitions> 
     10   <objectDefinitions> 
     11       
     12   </objectDefinitions> 
    5313</transfer> 
  • codedepot/trunk/projects/LookupManager/handlers/lookups.cfc

    r2104 r2106  
    8484                </cfscript>  
    8585        </cffunction> 
     86         
     87        <!--- index ---> 
     88        <cffunction name="index" access="public" returntype="void" output="false" hint="Index"> 
     89                <cfargument name="Event" type="any" required="yes"> 
     90                <cfset display(event)> 
     91        </cffunction> 
    8692 
    8793<!------------------------------------------- PUBLIC EVENTS -------------------------------------------> 
    8894 
    8995        <!--- addLookup ---> 
    90         <cffunction name="add" access="public" returntype="void" output="false" hint=""> 
     96        <cffunction name="addLookup" access="public" returntype="void" output="false" hint="Show the add lookups screen"> 
    9197                <cfargument name="Event" type="any" required="yes"> 
    9298                <cfset var rc = event.getCollection()> 
    93                 <!--- Get Tables ---> 
    94                 <cfdbinfo datasource="#instance.dsn#" name="rc.qTables" type="tables" /> 
    95                  
    96                 <cfscript> 
    97                         /* Lookups */ 
     99                <cfscript> 
     100                        /* Get All DB Tables */ 
     101                        rc.qTables = getLookupService().getDBTables(); 
     102                        /* XEH */ 
     103                        rc.xehAddColumns = "#instance.handlerPackage#lookups/addLookupColumns"; 
     104                        /* Lookup Variables */ 
    98105                        rc.systemLookups = getSetting("lookups_tables"); 
    99106                        rc.systemLookupsKeys = getSortedLookupKeys(); 
     
    103110        </cffunction> 
    104111 
     112        <!--- addColumns ---> 
     113        <cffunction name="addLookupColumns" access="public" returntype="void" output="false" hint="Process and show the addition of columns"> 
     114                <cfargument name="Event" type="any" required="yes"> 
     115                <cfset var rc = event.getCollection()> 
     116                <cfscript> 
     117                        /* Selection Validation */ 
     118                        if( listlen(event.getTrimValue("tables","")) eq 0 ){ 
     119                                getPlugin("messagebox").setMessage(type="warning", message="No tables selected, please select one."); 
     120                                setNextRoute("#instance.handlerPackage#lookups/add"); 
     121                        } 
     122                        /* Get DB Config Data */ 
     123                        rc.lookupConfig = getLookupService().getDBTableConfigurations(rc.tables,rc); 
     124                        /* Setup some list types */ 
     125                        rc.propertyTypes                = "binary,boolean,date,numeric,UUID,GUID,string"; 
     126                        rc.pktypes                              = "UUID,GUID,string"; 
     127                        rc.lookupBooleanTypes   = "radio,select"; 
     128                        rc.lookupHTMLTypes              = "password,richttext,text,textarea"; 
     129                        /* XEH */ 
     130                        rc.xehcreateLookups = "#instance.handlerPackage#lookups/createLookups"; 
     131                        rc.xehAdd = "#instance.handlerPackage#lookups/addLookup"; 
     132                        /* Set View */ 
     133                        event.setView('#instance.viewPackage#lookups/addLookupColumns'); 
     134                </cfscript> 
     135        </cffunction> 
     136         
     137        <!--- createLookups ---> 
     138        <cffunction name="createLookups" access="public" returntype="void" output="false" hint="Create the lookups"> 
     139                <cfargument name="Event" type="any" required="yes"> 
     140                <cfset var rc = event.getCollection()> 
     141                <cfscript>       
     142                        /* Setup Config File Locations */ 
     143                        rc.ConfigFileLocation = getSetting('configFileLocation',true); 
     144                        rc.transferConfigPath = locateFilePath(rc.transferConfigPath); 
     145                        rc.modelsPath = getSetting("ModelsPath"); 
     146                        rc.AppMapping = replace(getSetting("AppMapping"),"/",".","all"); 
     147                         
     148                        /* Create Lookups */ 
     149                        getLookupService().createLookups(rc.tables,rc); 
     150                         
     151                        /* Show Results */ 
     152                        getPlugin("messagebox").setMessage(type="info", message="Lookups created successfully"); 
     153                        setNextRoute(route="#instance.viewPackage#lookups/createConfirmation"); 
     154                </cfscript> 
     155        </cffunction> 
     156         
     157        <!--- createLookupsConfirmation ---> 
     158        <cffunction name="createConfirmation" access="public" returntype="void" output="false" hint="Confirmation"> 
     159                <cfargument name="Event" type="any" required="yes"> 
     160                <cfset var rc = event.getCollection()> 
     161                <cfscript>       
     162                        /* Set Restart Bit */ 
     163                        getController().setColdboxInitiated(false); 
     164                        event.setView("#instance.viewPackage#lookups/createConfirmation");               
     165                </cfscript> 
     166        </cffunction> 
     167         
     168        <!--- Display ---> 
    105169        <cffunction name="display" output="false" access="public" returntype="void" hint="Display System Lookups"> 
    106170                <cfargument name="Event" type="any"> 
     
    115179                rc.xehLookupEdit = "#instance.handlerPackage#lookups/dspEdit"; 
    116180                rc.xehLookupClean = "#instance.handlerPackage#lookups/cleanDictionary"; 
    117                  
     181                rc.xehLookupsAdd = "#instance.handlerPackage#lookups/addLookup"; 
    118182                //Get System Lookups 
    119183                rc.systemLookups = getSetting("lookups_tables"); 
    120184                rc.systemLookupsKeys = getSortedLookupKeys(); 
    121                  
    122                 //Param Choosen Lookup 
    123                 event.paramValue("lookupClass", rc.systemLookups[ rc.systemLookupsKeys[1] ]); 
    124                  
    125                 //Prepare Lookup's Meta Data Dictionary 
    126                 rc.mdDictionary = getLookupService().prepareDictionary(rc.lookupClass); 
    127                  
    128                 //Get Lookup Listing 
    129                 rc.qListing = getLookupService().getListing(rc.lookupClass); 
    130  
     185                         
     186                /* Validate we have lookups */ 
     187                if( ArrayLen(rc.systemLookupsKeys) ){ 
     188                        //Param Choosen Lookup 
     189                        event.paramValue("lookupClass", rc.systemLookups[ rc.systemLookupsKeys[1] ]); 
     190                        //Prepare Lookup's Meta Data Dictionary 
     191                        rc.mdDictionary = getLookupService().prepareDictionary(rc.lookupClass); 
     192                        //Get Lookup Listing 
     193                        rc.qListing = getLookupService().getListing(rc.lookupClass); 
     194                } 
     195                else{ 
     196                        event.paramValue("lookupClass",""); 
     197                        rc.qListing = Querynew(""); 
     198                        getPlugin("messagebox").setMessage(type="warning", message="No lookups declared, please declare some first."); 
     199                } 
    131200                //Set view to render 
    132201                event.setView("#instance.viewPackage#lookups/Listing"); 
     
    436505                <cfscript> 
    437506                var systemLookups = getSetting("lookups_tables"); 
    438                 systemLookupsKeys = structKeyArray(systemLookups); 
    439                 ArraySort(systemLookupsKeys,"text"); 
     507                var systemLookupsKeys = ArrayNew(1); 
     508                 
     509                if( not isSimpleValue(systemLookups) ){ 
     510                        systemLookupsKeys = structKeyArray(systemLookups); 
     511                        ArraySort(systemLookupsKeys,"text"); 
     512                } 
     513 
    440514                return systemLookupsKeys; 
    441515                </cfscript> 
  • codedepot/trunk/projects/LookupManager/includes/lookups/styles/lookups.css

    r2090 r2106  
    7777        font-weight: normal; 
    7878} 
    79 /* INputs */ 
     79/* Inputs */ 
    8080input { 
    8181        padding: 2px; 
     
    106106 color: #999; 
    107107} 
    108 input[disabled]:hover{ 
    109         background: #f6f6f6; 
    110         color: #999; 
    111 } 
    112108fieldset{ 
    113109        background-color: #f5f5f5; 
     
    127123} 
    128124input[type=text], input[type=password], input[type=checkbox], select {  
    129         font: normal 12px; 
     125        font-size: 12px; 
    130126        color:#333; 
    131127        border: 1px solid #d7d7d7; 
     
    133129        background: #FFFFFF url(../images/topfade.gif) repeat-x scroll center top; 
    134130} 
    135 input[type=text], input[type=password], input[type=checkbox], select { padding: .4em } 
     131input[type=text],input[type=password], input[type=checkbox], select { padding: .4em } 
    136132input[type=text]:focus, input[type=password]:focus, textarea:focus, input[type=checkbox]:focus, select:focus { 
    137133        border: 1px solid #886; 
     
    144140        border: 1px dotted #F00000; 
    145141        background:#FFECE6 url(../images/topfade.gif) repeat-x scroll center top; 
     142} 
     143input[disabled], select[disabled]{ 
     144 background: #f6f6f6; 
     145 color: #999;    
     146} 
     147input[disabled]:hover{ 
     148        background: #f6f6f6; 
     149        color: #999; 
    146150} 
    147151/* button stuff */ 
  • codedepot/trunk/projects/LookupManager/model/lookups/LookupService.cfc

    r2089 r2106  
    1010        The lookups service layer 
    1111-----------------------------------------------------------------------> 
    12 <cfcomponent hint="This is the lookup manager using Transfer" output="false"> 
     12<cfcomponent name="LookupService" hint="This is the lookup service." output="false"> 
    1313 
    1414<!----------------------------------- CONSTRUCTOR ------------------------------> 
     
    1818                <cfargument name="transfer"     type="any" _wireme="ocm:Transfer"> 
    1919                <cfargument name="transaction"  type="any" _wireme="ocm:TransferTransaction"> 
    20                 <!--- ************************************************************* ---> 
    21                 <cfscript> 
    22                         instance = StructNew(); 
    23          
    24                         setTransfer(arguments.transfer); 
    25          
     20                <cfargument name="lookupsDSN"   type="any" _wireme="coldbox:setting:lookups_dsn"> 
     21                <cfargument name="json"                 type="any" _wireme="coldbox:plugin:json"> 
     22                <!--- ************************************************************* ---> 
     23                <cfscript> 
     24                        variables.instance = StructNew(); 
     25         
     26                        /* Setup Transactions */ 
    2627                        arguments.transaction.advise(this, "^save"); 
    2728                        arguments.transaction.advise(this, "^delete"); 
    2829                         
    29                         /* Metadata Cache */ 
    30                         setMDDictionary( structnew() ); 
    31          
     30                        /* Properties */ 
     31                        instance.mdDictionary = structnew(); 
     32                        instance.transfer = arguments.transfer; 
     33                        instance.lookupsDSN = arguments.lookupsDSN; 
     34                        instance.JSON = arguments.json; 
     35                         
    3236                        return this; 
    3337                </cfscript> 
     
    4347                <cfscript> 
    4448                //get lookup listing 
    45                 return getTransfer().list(arguments.lookupClass, getDictionary(arguments.lookupClass).sortBy); 
     49                return instance.transfer.list(arguments.lookupClass, getDictionary(arguments.lookupClass).sortBy); 
    4650                </cfscript> 
    4751        </cffunction> 
     
    5458                <cfscript> 
    5559                //get lookup listing 
    56                 return getTransfer().getTransferMetaData(arguments.lookupClass); 
     60                return instance.transfer.getTransferMetaData(arguments.lookupClass); 
    5761                </cfscript> 
    5862        </cffunction> 
     
    6973                //Get by ID or new 
    7074                if ( len(trim(arguments.lookupID)) eq 0){ 
    71                         oLookup = getTransfer().new(arguments.lookupClass); 
     75                        oLookup = instance.transfer.new(arguments.lookupClass); 
    7276                } 
    7377                else{ 
    74                         oLookup = getTransfer().get(arguments.lookupClass, arguments.lookupID); 
     78                        oLookup = instance.transfer.get(arguments.lookupClass, arguments.lookupID); 
    7579                } 
    7680                /* return lookup object */ 
     
    8993                 
    9094                //Get by Property Struct 
    91                 oLookup = getTransfer().readByPropertyMap(arguments.lookupClass, arguments.propertyStruct); 
     95                oLookup = instance.transfer.readByPropertyMap(arguments.lookupClass, arguments.propertyStruct); 
    9296 
    9397                return oLookup; 
     
    110114                        } 
    111115                        else{ 
    112                                 oLookup = getTransfer().get(arguments.lookupClass,arguments.id); 
     116                                oLookup = instance.transfer.get(arguments.lookupClass,arguments.id); 
    113117                        } 
    114118                        //Remove Entry 
    115                         getTransfer().delete(oLookup); 
     119                        instance.transfer.delete(oLookup); 
    116120                </cfscript> 
    117121        </cffunction> 
     
    123127                <!--- ************************************************************* ---> 
    124128                <cfscript> 
    125                         getTransfer().save(arguments.LookupObject); 
     129                        instance.transfer.save(arguments.LookupObject); 
    126130                </cfscript> 
    127131        </cffunction> 
     
    135139                        var lookupDictionary = structnew(); 
    136140                         
    137                         if ( not structKeyExists( getmdDictionary() , arguments.lookupClass) ){ 
     141                        if ( not structKeyExists( instance.mdDictionary , arguments.lookupClass) ){ 
    138142                                //dictionary not found, prepare it 
    139143                                lookupDictionary = prepareDictionary(arguments.lookupClass); 
    140144                        } 
    141145                        else 
    142                                 lookupDictionary = structFind(getmdDictionary(), arguments.lookupClass ); 
     146                                lookupDictionary = structFind(instance.mdDictionary, arguments.lookupClass ); 
    143147                                 
    144148                        return lookupDictionary; 
     
    319323                else{ 
    320324                        /* Else just get the dictionary locally. */ 
    321                         mdStruct = structFind(getmdDictionary(), arguments.lookupClass ); 
     325                        mdStruct = structFind(instance.mdDictionary, arguments.lookupClass ); 
    322326                } 
    323327                return mdStruct; 
     
    327331        <!--- Clean Dictionary ---> 
    328332        <cffunction name="cleanDictionary" access="public" returntype="void" output="false" hint="Clean the Metadata Dictionary"> 
    329                 <cfset setmdDictionary(structnew())> 
    330         </cffunction> 
    331  
     333                <cfset instance.mdDictionary = structnew()> 
     334        </cffunction> 
     335 
     336        <!--- getDBTables ---> 
     337        <cffunction name="getDBTables" output="false" access="public" returntype="any" hint="Get a datasources DB tables"> 
     338                <cfset var qTables = 0> 
     339 
     340                <cfdbinfo datasource="#instance.lookupsDSN#" name="qTables" type="tables" /> 
     341 
     342                <cfreturn qTables> 
     343        </cffunction> 
     344         
     345        <!--- getDBTableConfigurations ---> 
     346        <cffunction name="getDBTableConfigurations" output="false" access="public" returntype="any" hint="Returns a struct of table configurations according to passed in tables and collected data from the lookup views"> 
     347                <!--- ************************************************************* ---> 
     348                <cfargument name="tables"               type="string" required="true" hint="A comma delimmited list of tables to create configurations for"/> 
     349                <cfargument name="collection"   type="struct" required="true" hint="A collection of data to process"/> 
     350                <!--- ************************************************************* ---> 
     351                <cfset var lookupConfig = structnew()> 
     352                <cfset var table = 0> 
     353                <cfset var tableConfig = 0> 
     354                 
     355                <cfloop list="#arguments.tables#" index="table"> 
     356                        <!--- Prepare table config ---> 
     357                        <cfset tableConfig = structnew()> 
     358                        <cfset tableConfig.alias = arguments.collection["#table#_alias"]> 
     359                        <cfset tableConfig.class = arguments.collection["#table#_class"]> 
     360                        <cfset tableConfig.decorator = arguments.collection["#table#_decorator"]> 
     361                         
     362                        <!--- Get Column Info ---> 
     363                        <cfdbinfo datasource="#instance.lookupsDSN#" name="tableConfig.columns" table="#table#" type="columns" /> 
     364                         
     365                        <!--- Save it in return configuration ---> 
     366                        <cfset lookupConfig[table] = tableConfig> 
     367                </cfloop> 
     368                 
     369                <cfreturn lookupConfig> 
     370        </cffunction> 
     371         
     372        <!--- createLookups ---> 
     373        <cffunction name="createLookups" output="false" access="public" returntype="any" hint="Create Lookups"> 
     374                <!--- ************************************************************* ---> 
     375                <cfargument name="tables"               type="string" required="true" hint="The tables to create lookup config for"/> 
     376                <cfargument name="collection"   type="struct" required="true" default="" hint="The data collection to use to build the lookups"/> 
     377                <!--- ************************************************************* ---> 
     378                <cfscript> 
     379                        var x = 0; 
     380                        var y = 0; 
     381                        var rc = arguments.collection; 
     382                        var lookupsPath = getDirectoryFromPath(getMetadata(this).path); 
     383                        /* Read IN ColdBox File */ 
     384                        var coldboxXMLDoc  = xmlParse(rc.ConfigFileLocation); 
     385                        var lookupsSetting = xmlSearch(coldboxXMLDoc,"//YourSettings/Setting[@name='lookups_tables']"); 
     386                        /* Transfer XML */ 
     387                        var transferXMLDoc =  xmlParse(rc.transferConfigPath); 
     388                        var definitionsArray = xmlSearch(transferXMLDoc,"//objectDefinitions"); 
     389                        var objDefinitions = definitionsArray[1].xmlChildren; 
     390                        var defIndex = 0; 
     391                        /* Common Vars */ 
     392                        var thisTable = ""; 
     393                        var thisColumns = ""; 
     394                        var thisCol = ""; 
     395                        var thisColAlias = ""; 
     396                        var objIndex = 1; 
     397                        var thisM2One = ""; 
     398                        var thisRel = ""; 
     399                        var thisRelAlias = ""; 
     400                        var lookupsTables = {}; 
     401                        var thisbuffer = 0; 
     402                        var tabAlign = "#chr(9)##chr(9)##chr(9)#"; 
     403                        var cr = chr(13); 
     404                        var sortBy = ""; 
     405                        var decoratorTemplate = "";  
     406                         
     407                        /* Create Table JSON */ 
     408                        for(x=1;x lte listLen(arguments.tables); x++){ 
     409                                lookupsTables[rc["#listGetAt(arguments.tables,x)#_alias"]] = rc["#listGetAt(arguments.tables,x)#_class"]; 
     410                        } 
     411                        lookupsTables = replace(instance.json.encode(lookupsTables),'"',"'","all"); 
     412                        /* Set it back in the lookupXML */ 
     413                        lookupsSetting[1].xmlAttributes.value = lookupsTables; 
     414                        /* Write it out */ 
     415                        FileWrite(rc.ConfigFileLocation,toString(coldboxXMLDoc)); 
     416                         
     417                         
     418                        /* Cleanup of transfer.xml */ 
     419                        defIndex = arrayLen(objDefinitions); 
     420                        for(x=1;x lte defIndex; x++){ 
     421                                if( listFindNoCase(arguments.tables,objDefinitions[x].XMLAttributes.table) ){ 
     422                                        /* Remove it */ 
     423                                        ArrayDeleteAt(objDefinitions,x); 
     424                                } 
     425                        } 
     426                        /* Set new Index */ 
     427                        defIndex = ArrayLen(objDefinitions) + 1; 
     428                         
     429                        /* Loop over tables To add Transfer Stuff*/ 
     430                        for(x=1;x lte listLen(arguments.tables); x++){ 
     431                                /* Setup Loopers & Vars */ 
     432                                objIndex = 1; 
     433                                thisTable = listGetAt(arguments.tables,x); 
     434                                thisColumns = rc["#thisTable#_cols"]; 
     435                                thisM2One = ""; 
     436                                /* Init M2One List */ 
     437                                if( structKeyExists(rc,"#thisTable#_m2o") ){ 
     438                                        thisM2One = rc["#thisTable#_m2o"]; 
     439                                } 
     440                                thisBuffer = createObject("java","java.lang.StringBuffer").init(''); 
     441                                sortBy = rc["#thisTable#_sortby"]; 
     442                                 
     443                                /* Create new Object */ 
     444                                objDefinitions[defIndex] = xmlElemNew(transferXMLDoc,"object"); 
     445                                /* Add attributes to new Object Definition */ 
     446                                objDefinitions[defIndex].xmlAttributes["name"] = rc["#thisTable#_class"]; 
     447                                objDefinitions[defIndex].xmlAttributes["table"] = thisTable; 
     448                                objDefinitions[defIndex].xmlAttributes["decorator"] = rc.AppMapping & ".model." & rc["#thisTable#_decorator"]; 
     449                                /* Create Decorator Sort By */ 
     450                                thisBuffer.append('tc.SortBy = "'&rc["#thisTable#_col_#sortBy#_alias"]&'";#cr#'); 
     451                                 
     452                                /* Create PK Entry */ 
     453                                objDefinitions[defIndex].xmlChildren[objIndex] = xmlElemNew(transferXMLDoc,"id"); 
     454                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["name"] = rc["#thisTable#_pkalias"]; 
     455                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["column"] = rc["#thisTable#_pkcolumn"]; 
     456                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["type"] = rc["#thisTable#_pktype"]; 
     457                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["generate"] = rc["#thisTable#_pkgenerate"]; 
     458                                 
     459                                /* Create Columns */ 
     460                                for(y=1; y lte listLen(thisColumns); y++){ 
     461                                        /* Setup Column and Looper */ 
     462                                        thisCol = listGetAt(thisColumns,y); 
     463                                        if( thisCol neq rc["#thisTable#_pkcolumn"] and listFindNoCase(thisM2One,thisCol) eq 0 ){ 
     464                                                objIndex++; 
     465                                                thisColAlias = rc["#thisTable#_col_#thisCol#_alias"]; 
     466                                                /* Create Column Definition */ 
     467                                                objDefinitions[defIndex].xmlChildren[objIndex] = xmlElemNew(transferXMLDoc,"property"); 
     468                                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["name"] = rc["#thisTable#_col_#thisCol#_alias"]; 
     469                                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["column"] = thisCol; 
     470                                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["type"] = rc["#thisTable#_col_#thisCol#_type"]; 
     471                                                /* Null Check */ 
     472                                                if( structKeyExists(rc,"#thisTable#_col_#thisCol#_nullable") ){ 
     473                                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["nullable"] = "true"; 
     474                                                } 
     475                                                /* ignores */ 
     476                                                if( structKeyExists(rc,"#thisTable#_col_#thisCol#_ignoreinsert") ){ 
     477                                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["ignore-insert"] = "true"; 
     478                                                } 
     479                                                if( structKeyExists(rc,"#thisTable#_col_#thisCol#_ignoreupdate") ){ 
     480                                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["ignore-update"] = "true"; 
     481                                                } 
     482                                                /* refreshes */ 
     483                                                if( structKeyExists(rc,"#thisTable#_col_#thisCol#_refreshinsert") ){ 
     484                                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["refresh-insert"] = "true"; 
     485                                                } 
     486                                                if( structKeyExists(rc,"#thisTable#_col_#thisCol#_refreshupdate") ){ 
     487                                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["refresh-update"] = "true"; 
     488                                                } 
     489                                                /* Decorator Writes */ 
     490                                                thisBuffer.append('#tabAlign#tc.#thisColAlias#.helptext = "' & rc["#thisTable#_col_#thisCol#_helptext"] & '";#cr#'); 
     491                                                if( structKeyExists(rc,"#thisTable#_col_#thisColAlias#_maxlen") and rc["#thisTable#_col_#thisCol#_maxlen"] neq 0 ){ 
     492                                                        thisBuffer.append('#tabAlign#tc.#thisColAlias#.maxlength = "' & rc["#thisTable#_col_#thisCol#_maxlen"] & '";#cr#'); 
     493                                                } 
     494                                                if( not structKeyExists(rc,"#thisTable#_col_#thisCol#_display") ){ 
     495                                                        thisBuffer.append('#tabAlign#tc.#thisColAlias#.display = false;#cr#'); 
     496                                                } 
     497                                                if( structKeyExists(rc,"#thisTable#_col_#thisCol#_html") ){ 
     498                                                        thisBuffer.append('#tabAlign#tc.#thisColAlias#.html = "' & rc["#thisTable#_col_#thisCol#_html"] & '";#cr#'); 
     499                                                } 
     500                                        }//if not pK column                                      
     501                                } 
     502                                /* Create Many To One Relationships */ 
     503                                for(y=1; y lte listLen(thisM2One); y++){ 
     504                                        thisRel = listGetAt(thisM2One,y); 
     505                                        objIndex++; 
     506                                        /* Create ManyToOne Definition */ 
     507                                        objDefinitions[defIndex].xmlChildren[objIndex] = xmlElemNew(transferXMLDoc,"manytoone"); 
     508                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["name"] = rc["#thisTable#_m2o_#thisRel#_linkName"]; 
     509                                        /* Create Lazy */ 
     510                                        if( structKeyExists(rc,"#thisTable#_m2o_#thisRel#_lazy") ){ 
     511                                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["lazy"] = "true"; 
     512                                        } 
     513                                        /* Create Proxied */ 
     514                                        if( structKeyExists(rc,"#thisTable#_m2o_#thisRel#_proxied") ){ 
     515                                                objDefinitions[defIndex].xmlChildren[objIndex].XMLAttributes["proxied"] = "true"; 
     516                                        } 
     517                                        /* Create Link Object */ 
     518                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLChildren[1] = xmlElemNew(transferXMLDoc,"link"); 
     519                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLChildren[1].XMLAttributes["column"] = rc["#thisTable#_m2o_#thisRel#_linkToColumn"]; 
     520                                        objDefinitions[defIndex].xmlChildren[objIndex].XMLChildren[1].XMLAttributes["to"] = rc["#thisTable#_m2o_#thisRel#_linkToClass"];         
     521                                        /* Create Decorator Writes */                            
     522                                        thisRelAlias = rc["#thisTable#_m2o_#thisRel#_linkName"]; 
     523                                        thisBuffer.append('#tabAlign#tc.#thisRelAlias#.displayColumn = "' & rc["#thisTable#_m2o_#thisRel#_displayColumn"] & '";#cr#'); 
     524                                } 
     525                                 
     526                                /* Create Decorator */ 
     527                                decoratorTemplate = FileRead(lookupsPath & "DecoratorTemplate.cfm"); 
     528                                /* Replace TC Setup */ 
     529                                decoratorTemplate = replacenocase(decoratorTemplate,"@tcreplace@",thisBuffer.toString()); 
     530                                FileWrite(rc.modelsPath & "/" & replace(rc["#thisTable#_decorator"],".","/","all") & ".cfc", decoratorTemplate); 
     531                                /* Continue to new definition */ 
     532                                defIndex++; 
     533                        }//end looping of table definitions 
     534                        /* Write the transfer.xml out */ 
     535                        FileWrite(rc.transferConfigPath,xmlTransform(toString(transferXMLDoc),FileRead(lookupsPath & "xmlFormatter.xsl")));                      
     536                </cfscript> 
     537        </cffunction> 
    332538         
    333539<!----------------------------------- PRIVATE ------------------------------> 
    334          
    335         <!--- getter and setter for mdDictionary ---> 
    336         <cffunction name="getmdDictionary" access="private" returntype="struct" output="false"> 
    337                 <cfreturn instance.mdDictionary> 
    338         </cffunction> 
    339         <cffunction name="setmdDictionary" access="private" returntype="void" output="false"> 
    340                 <cfargument name="mdDictionary" type="struct" required="true"> 
    341                 <cfset instance.mdDictionary = arguments.mdDictionary> 
    342         </cffunction> 
    343  
    344         <!--- Get Set Transfer ---> 
    345         <cffunction name="getTransfer" access="private" returntype="any" output="false"> 
    346                 <cfreturn instance.transfer /> 
    347         </cffunction>    
    348         <cffunction name="setTransfer" access="private" returntype="void" output="false"> 
    349                 <cfargument name="transfer" type="any" required="true"> 
    350                 <cfset instance.transfer = arguments.transfer /> 
    351         </cffunction> 
    352540         
    353541        <!--- Throw Facade ---> 
  • codedepot/trunk/projects/LookupManager/views/lookups/Add.cfm

    r2104 r2106  
    3434 
    3535<!--- Title ---> 
    36 <h2><img src="#rc.imgPath#/cog.png" align="absmiddle"> Lookup Manager > Add Record</h2> 
     36<h2><img src="#rc.imgPath#/cog.png" align="absmiddle"> ColdBox Lookup Manager > Add Record</h2> 
    3737<!--- BACK ---> 
    3838<div class="backbutton"> 
  • codedepot/trunk/projects/LookupManager/views/lookups/Edit.cfm

    r2104 r2106  
    4444 
    4545<!--- Title ---> 
    46 <h2><img src="#rc.imgPath#/cog.png" align="absmiddle"> Lookup Manager > Edit Record</h2> 
     46<h2><img src="#rc.imgPath#/cog.png" align="absmiddle"> ColdBox Lookup Manager > Edit Record</h2> 
    4747<!--- BACK ---> 
    4848<div class="backbutton"> 
  • codedepot/trunk/projects/LookupManager/views/lookups/Listing.cfm

    r2104 r2106  
    4040<div id="content"> 
    4141<!--- Title ---> 
    42 <h2><img src="#rc.imgPath#/cog.png" align="absmiddle"> Lookup Manager</h2> 
     42<h2><img src="#rc.imgPath#/cog.png" align="absmiddle"> ColdBox Lookup Manager</h2> 
    4343<p>From here you can manage all the lookup tables in the system as defined in your coldbox.xml (lookups_tables)</p> 
    4444 
     
    7878                                <img src="#rc.imgPath#/book_open.png" border="0" align="absmiddle" alt="Reload" /> 
    7979                                Reload Dictionary 
     80                        </span> 
     81                </a> 
     82                &nbsp; 
     83                <a href="#event.buildLink(rc.xehLookupsAdd)#" class="buttonLinks"> 
     84                        <span> 
     85                                <img src="#rc.imgPath#/add.png" border="0" align="absmiddle" alt="Add" /> 
     86                                Declare Lookups 
    8087                        </span> 
    8188                </a> 
  • codedepot/trunk/projects/LookupManager/views/lookups/addLookup.cfm

    r2104 r2106  
    55<script type="text/javascript"> 
    66        $(document).ready(function() { 
     7        /* Form Validation */ 
     8                $('##manageForm').formValidation({ 
     9                        err_class       : "invalidLookupInput", 
     10                        err_list        : true, 
     11                        callback        : 'prepareSubmit' 
     12                }); 
    713        }); 
     14        function submitForm(){ 
     15                $('##manageForm').submit();              
     16        } 
     17        function prepareSubmit(){ 
     18                $('##_buttonbar').slideUp("fast"); 
     19                $('##_loader').fadeIn("slow");           
     20                return true; 
     21        } 
    822</script> 
    923</cfoutput> 
     
    1832#getPlugin("messagebox").renderit()# 
    1933 
     34<!--- Configured Lookups ---> 
    2035<form> 
    2136        <fieldset> 
    2237        <legend>Configured Lookups:</legend> 
     38        <div>Connected to the <strong>#getSetting('lookups_dsn')#</strong> datasource</div> 
    2339        <table class="tablesorter" width="100%" id="setlookupsTable" cellspacing="1" cellpadding="0" border="0"> 
    2440                <thead> 
    2541                        <tr> 
    26                                 <th>Alias</th> 
    27                                 <th>Class</th> 
     42                                <th>Lookup Alias</th> 
     43                                <th>Transfer Class</th> 
    2844                        </tr> 
    2945                </thead> 
     
    4056</form> 
    4157 
    42 <form> 
     58<!--- New Lokups To Configure ---> 
     59<form name="manageForm" id="manageForm" action="#event.buildLink(rc.xehAddColumns)#" method="post"> 
    4360        <fieldset> 
    44         <legend>Choose Tables To Manage</legend> 
    45         <p>Please select only the tables you wish to manage that are <strong>NOT</strong> already configured</p> 
     61        <legend>Choose Tables To Manage:</legend> 
     62        <p>Please select only the tables you wish to manage that are <strong>NOT</strong> already configured as seen above. 
     63        Please also enter the extra metadata necessary to create the lookup associations. All decorators created will be 
     64        placed in this applications model folder. 
     65        </p> 
    4666         
     67        <p> 
     68                <label for="transferConfigPath">Transfer Config Path:</label> 
     69                This will be the relative location of the transfer config file to modify with new looup information.<br /> 
     70                <strong>#getSetting("AppMapping")#/</strong><input type="text" size="80" value="config/transfer.xml.cfm" name="transferConfigPath" id="transferConfigPath"> 
     71        </p> 
     72         
     73        <table class="tablesorter" width="100%" id="setlookupsTable" cellspacing="1" cellpadding="0" border="0"> 
     74                <thead> 
     75                <tr> 
     76                        <th>Table</th> 
     77                        <th title="The alias used by the lookups manager">Lookup Alias</th> 
     78                        <th title="The transfer package-object name">Transfer Class</th> 
     79                        <th title="The decorator dot path">Decorator Path</th> 
     80                </tr> 
     81                </thead> 
     82                <tbody> 
     83                <cfloop query="rc.qTables"> 
     84                <tr> 
     85                        <td><label><input type="checkbox" name="tables" id="tables" value="#table_name#"> #table_name#</label></td> 
     86                        <td><input required="true" type="text" size="25" name="#table_name#_alias" id="#table_name#_alias" value="#capCase(table_name)#"></td> 
     87                        <td><input required="true" type="text" size="25" name="#table_name#_class" id="#table_name#_class" value="#Singularize(capCase(table_name))#"></td> 
     88                        <td><strong>model.</strong><input required="true" type="text" size="35" name="#table_name#_decorator" id="#table_name#_decorator" value="#Singularize(capCase(table_name))#"></td> 
     89                </tr> 
     90                </cfloop> 
     91                </tbody> 
     92        </table> 
     93         
     94        <!--- Hidden Loader ---> 
     95        <div id="_loader" class="formloader"> 
     96                <p> 
     97                        Submitting...<br /> 
     98                        <img src="#rc.imgPath#/ajax-loader-horizontal.gif" align="absmiddle"> 
     99                        <img src="#rc.imgPath#/ajax-loader-horizontal.gif" align="absmiddle"> 
     100                </p> 
     101        </div> 
     102         
     103        <!--- Create / Cancel ---> 
     104        <div id="_buttonbar"> 
     105                <a href="#event.buildLink(rc.xehLookupList,0)#" class="buttonLinks"> 
     106                        <span> 
     107                                <img src="#rc.imgPath#/cancel.png" border="0" align="absmiddle" alt="Cancel" /> 
     108                                Cancel 
     109                        </span> 
     110                </a> 
     111                &nbsp; 
     112                <a href="javascript:submitForm()" class="buttonLinks"> 
     113                        <span> 
     114                                <img src="#rc.imgPath#/add.png" border="0" align="absmiddle" alt="Add" /> 
     115                                Next Step 
     116                        </span> 
     117                </a> 
     118        </div> 
    47119        </fieldset> 
    48120</form>