Changeset 710

Show
Ignore:
Timestamp:
03/29/08 03:48:57 (5 months ago)
Author:
scorfield
Message:

Incorporate latest scaffolder.

Location:
framework/trunk/scaffolder
Files:
13 added
25 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/scaffolder/scaffolder/Metadata.cfc

    r676 r710  
    273273                 
    274274                <cfreturn local.out> 
     275        </cffunction> 
     276         
     277        <cffunction name="uFirst" returntype="string" access="public" output="No" hint="I make the first character of a string uppercase"> 
     278                <cfargument name="inString" type="string" required="Yes" /> 
     279                 
     280                <cfreturn UCase(Left(inString,1)) & RemoveChars(inString,1,1)> 
     281        </cffunction> 
     282         
     283        <cffunction name="lFirst" returntype="string" access="public" output="No" hint="I make the first character of a string lowercase"> 
     284                <cfargument name="inString" type="string" required="Yes" /> 
     285                 
     286                <cfreturn LCase(Left(inString,1)) & RemoveChars(inString,1,1)> 
    275287        </cffunction> 
    276288         
     
    10411053                <cfloop query="arguments.qTableData"> 
    10421054                        <!--- Find the field tag position or create a new one ---> 
    1043                         <cfset thisFieldIndex = createFieldTag(objectIndex=objectIndex,name=arguments.qTableData.column_name)> 
     1055                        <cfset thisFieldIndex = createFieldTag(objectIndex=objectIndex,name=lFirst(arguments.qTableData.column_name))> 
    10441056                         
    10451057                        <!--- Set up a pointer to the structure containing the attributes of the field tag in the XML ---> 
     
    10791091                        <cfset stProperties = variables.xScaffoldingConfig.scaffolding.objects.object[objectIndex].XmlChildren[thisFieldIndex].XmlAttributes > 
    10801092                         
    1081                         <!--- The values of other XML attribute values never get overwritten ---> 
     1093                        <!--- The values of these XML attribute values never get overwritten, if they are already present. ---> 
    10821094                        <cfset setAttributeValue(stProperties,"sort",arguments.qTableData.key_seq)> 
    10831095                        <cfset setAttributeValue(stProperties,"showOnList","true")> 
    10841096                        <cfset setAttributeValue(stProperties,"showOnForm","true")> 
     1097                        <cfset setAttributeValue(stProperties,"showOnDisplay","true")> 
    10851098                        <cfif arguments.qTableData.nullable> 
    10861099                                <cfset setAttributeValue(stProperties,"required","false")> 
     
    10951108                                <cfset setAttributeValue(stProperties,"size","15")> 
    10961109                                <cfset setAttributeValue(stProperties,"maxlength",8)> 
     1110                                <cfset setAttributeValue(stProperties,"validation","time")> 
    10971111                        <cfelseif stProperties.type IS "date"> 
    10981112                                <cfset setAttributeValue(stProperties,"formType","Date")> 
     
    11001114                                <cfset setAttributeValue(stProperties,"size","15")> 
    11011115                                <cfset setAttributeValue(stProperties,"maxlength",11)> 
     1116                                <cfset setAttributeValue(stProperties,"validation","date")> 
    11021117                        <cfelseif isDefined("stProperties.parent") AND stProperties.parent IS NOT ""> 
    11031118                                <cfset setAttributeValue(stProperties,"formType","Dropdown")> 
    11041119                                <cfset setAttributeValue(stProperties,"format","Trim")> 
    11051120                                <cfset setAttributeValue(stProperties,"size","1")> 
     1121                                <cfset setAttributeValue(stProperties,"validation","parent")> 
    11061122                        <cfelseif stProperties.type IS "boolean"> 
    11071123                                <cfset setAttributeValue(stProperties,"formType","Checkbox")> 
    11081124                                <cfset setAttributeValue(stProperties,"format","YesNo")> 
    11091125                                <cfset setAttributeValue(stProperties,"size","0")> 
     1126                                <cfset setAttributeValue(stProperties,"validation","boolean")> 
    11101127                        <cfelseif isDefined("stProperties.identity") AND stProperties.identity> 
    11111128                                <cfset setAttributeValue(stProperties,"formType","Hidden")> 
     
    11171134                                <cfset setAttributeValue(stProperties,"size","15")> 
    11181135                                <cfset setAttributeValue(stProperties,"maxlength",15)> 
     1136                                <cfset setAttributeValue(stProperties,"validation","currency")> 
    11191137                        <cfelseif stProperties.fuseDocType IS "integer"> 
    11201138                                <cfset setAttributeValue(stProperties,"formType","Text")> 
     
    11221140                                <cfset setAttributeValue(stProperties,"size","15")> 
    11231141                                <cfset setAttributeValue(stProperties,"maxlength",15)> 
     1142                                <cfset setAttributeValue(stProperties,"validation","integer")> 
    11241143                        <cfelseif stProperties.type IS "numeric"> 
    11251144                                <cfset setAttributeValue(stProperties,"formType","Text")> 
     
    11271146                                <cfset setAttributeValue(stProperties,"size","15")> 
    11281147                                <cfset setAttributeValue(stProperties,"maxlength",15)> 
     1148                                <cfset setAttributeValue(stProperties,"validation","real")> 
    11291149                        <cfelseif arguments.qTableData.length gt 200> 
    11301150                                <cfset setAttributeValue(stProperties,"formType","Textarea")> 
     
    11381158                                <cfset setAttributeValue(stProperties,"maxlength",min(arguments.qTableData.length,getBuffer()))> 
    11391159                        </cfif> 
    1140                          
     1160                        <!--- Try to catch any other special types for possible JS validation ---> 
     1161                        <cfif NOT structKeyExists(stProperties,"validation")> 
     1162                                <cfif arguments.qTableData.column_name CONTAINS "zip_code" AND arguments.qTableData.length GE 5> 
     1163                                        <cfset setAttributeValue(stProperties,"validation","zip_code")> 
     1164                                <cfelseif arguments.qTableData.column_name CONTAINS "zipcode" AND arguments.qTableData.length GE 5> 
     1165                                        <cfset setAttributeValue(stProperties,"validation","zip_code")> 
     1166                                <cfelseif arguments.qTableData.column_name CONTAINS "postcode" AND arguments.qTableData.length GE 5> 
     1167                                        <cfset setAttributeValue(stProperties,"validation","zip_code")> 
     1168                                <cfelseif arguments.qTableData.column_name CONTAINS "post_code" AND arguments.qTableData.length GE 5> 
     1169                                        <cfset setAttributeValue(stProperties,"validation","zip_code")> 
     1170                                <cfelseif arguments.qTableData.column_name CONTAINS "email" AND arguments.qTableData.length GT 6> 
     1171                                        <cfset setAttributeValue(stProperties,"validation","email")> 
     1172                                <cfelseif arguments.qTableData.column_name CONTAINS "phone" AND arguments.qTableData.length GT 6> 
     1173                                        <cfset setAttributeValue(stProperties,"validation","phone")> 
     1174                                <cfelseif arguments.qTableData.column_name CONTAINS "url" AND arguments.qTableData.length GT 6> 
     1175                                        <cfset setAttributeValue(stProperties,"validation","url")> 
     1176                                <cfelse> 
     1177                                        <cfset setAttributeValue(stProperties,"validation","none")> 
     1178                                </cfif> 
     1179                        </cfif> 
    11411180                </cfloop> 
    11421181        </cffunction> 
     
    14041443                <cfloop index="i" from="1" to="#arrayLen(xFields)#"> 
    14051444                        <cfset arrayAppend(aFields,xFields[i].XmlAttributes)> 
    1406                         <cfset aFields[i]["table"] = arguments.table> 
     1445                        <cfset aFields[i]["table"] = uFirst(arguments.table)> 
    14071446                        <!--- Set default values on missing entries in the XML ---> 
    14081447                        <cfif NOT structKeyExists(aFields[i],"alias")> 
    1409                                 <cfset aFields[i]["alias"] = aFields[i]["name"]> 
     1448                                <cfset aFields[i]["alias"] = lFirst(aFields[i]["name"])> 
    14101449                        </cfif> 
    14111450                        <cfif NOT structKeyExists(aFields[i],"label")> 
     
    14181457                                <cfset aFields[i]["showOnForm"] = "true"> 
    14191458                        </cfif> 
     1459                        <cfif NOT structKeyExists(aFields[i],"showOnDisplay")> 
     1460                                <cfset aFields[i]["showOnDisplay"] = "true"> 
     1461                        </cfif> 
    14201462                        <cfif NOT structKeyExists(aFields[i],"type")> 
    14211463                                <cfset aFields[i]["type"] = "string"> 
     1464                        </cfif> 
     1465                        <cfif NOT structKeyExists(aFields[i],"fuseDocType")> 
     1466                                <cfset aFields[i]["fuseDocType"] = "string"> 
    14221467                        </cfif> 
    14231468                        <cfif NOT structKeyExists(aFields[i],"formType")> 
     
    14251470                                        <cfset aFields[i]["formType"] = "Dropdown"> 
    14261471                                <cfelseif aFields[i].type IS "date"> 
    1427                                         <cfset aFields[i]["formType"] = "Calendar"> 
     1472                                        <cfif aFields[i].name CONTAINS "time"> 
     1473                                                <cfset aFields[i]["formType"] = "Time"> 
     1474                                        <cfelse> 
     1475                                                <cfset aFields[i]["formType"] = "Calendar"> 
     1476                                        </cfif> 
    14281477                                <cfelseif aFields[i].type IS "boolean"> 
    14291478                                        <cfset aFields[i]["formType"] = "Checkbox"> 
     
    14371486                        <cfif NOT structKeyExists(aFields[i],"format")> 
    14381487                                <cfif aFields[i].type IS "date"> 
    1439                                         <cfset aFields[i]["format"] = "Date(dd/mmm/yyyy)"> 
     1488                                        <cfif aFields[i].name CONTAINS "time"> 
     1489                                                <cfset aFields[i]["format"] = "Time"> 
     1490                                        <cfelse> 
     1491                                                <cfset aFields[i]["format"] = "Date(dd/mmm/yyyy)"> 
     1492                                        </cfif> 
    14401493                                <cfelseif aFields[i].type IS "boolean"> 
    14411494                                        <cfset aFields[i]["format"] = "YesNo"> 
     
    14481501                                <cfelse> 
    14491502                                        <cfset aFields[i]["format"] = "Trim"> 
     1503                                </cfif> 
     1504                        </cfif> 
     1505                         
     1506                        <cfif NOT structKeyExists(aFields[i],"validation")> 
     1507                                <cfif structKeyExists(aFields[i],"parent")> 
     1508                                        <cfset aFields[i]["validation"] = "parent"> 
     1509                                <cfelseif aFields[i].formType IS "Time"> 
     1510                                        <cfset aFields[i]["validation"] = "time"> 
     1511                                <cfelseif aFields[i].formType IS "Date" OR aFields[i].formType IS "Calendar"> 
     1512                                        <cfset aFields[i]["validation"] = "date"> 
     1513                                <cfelseif aFields[i].type IS "boolean"> 
     1514                                        <cfset aFields[i]["validation"] = "boolean"> 
     1515                                <cfelseif aFields[i].type IS "money"> 
     1516                                        <cfset aFields[i]["validation"] = "currency"> 
     1517                                <cfelseif aFields[i].fuseDocType IS "integer"> 
     1518                                        <cfset aFields[i]["validation"] = "integer"> 
     1519                                <cfelseif aFields[i].type IS "numeric"> 
     1520                                        <cfset aFields[i]["validation"] = "real"> 
     1521                                <cfelseif aFields[i].type IS "string" AND aFields[i].name CONTAINS "zip_code" AND structKeyExists(aFields[i],"maxlength") AND aFields[i].maxlength GE 5> 
     1522                                        <cfset aFields[i]["validation"] = "zip_code"> 
     1523                                <cfelseif aFields[i].type IS "string" AND aFields[i].name CONTAINS "zipcode" AND structKeyExists(aFields[i],"maxlength") AND aFields[i].maxlength GE 5> 
     1524                                        <cfset aFields[i]["validation"] = "zip_code"> 
     1525                                <cfelseif aFields[i].type IS "string" AND aFields[i].name CONTAINS "postcode" AND structKeyExists(aFields[i],"maxlength") AND aFields[i].maxlength GE 5> 
     1526                                        <cfset aFields[i]["validation"] = "zip_code"> 
     1527                                <cfelseif aFields[i].type IS "string" AND aFields[i].name CONTAINS "post_code" AND structKeyExists(aFields[i],"maxlength") AND aFields[i].maxlength GE 5> 
     1528                                        <cfset aFields[i]["validation"] = "zip_code"> 
     1529                                <cfelseif aFields[i].type IS "string" AND aFields[i].name CONTAINS "email" AND structKeyExists(aFields[i],"maxlength") AND aFields[i].maxlength GT 6> 
     1530                                        <cfset aFields[i]["validation"] = "email"> 
     1531                                <cfelseif aFields[i].type IS "string" AND aFields[i].name CONTAINS "phone" AND structKeyExists(aFields[i],"maxlength") AND aFields[i].maxlength GT 6> 
     1532                                        <cfset aFields[i]["validation"] = "phone"> 
     1533                                <cfelseif aFields[i].type IS "string" AND aFields[i].name CONTAINS "url" AND structKeyExists(aFields[i],"maxlength") AND aFields[i].maxlength GT 6> 
     1534                                        <cfset aFields[i]["validation"] = "url"> 
     1535                                <cfelse> 
     1536                                        <cfset aFields[i]["validation"] = "none"> 
    14501537                                </cfif> 
    14511538                        </cfif> 
     
    14741561                                hint="I return a list of field aliases for a table." > 
    14751562                <cfargument name="table" type="string" required="Yes" hint="I am the name of the table who's fields are to be output."> 
     1563                <cfargument name="select" type="string" required="No" default="All" hint="I am the selction criteria for the fields to be output. Can be All(default), showOnForm, showOnList, showOnDisplay."> 
    14761564                <cfset var i = 0> 
    14771565                <cfset var aFields = getFieldsFromXML(arguments.table)> 
     
    14791567                 
    14801568                <cfloop from="1" to="#arrayLen(aFields)#" index="i"> 
    1481                         <cfif structKeyExists(aFields[i],"alias")> 
    1482                                 <cfset lFields = ListAppend(lFields,aFields[i].alias)> 
    1483                         <cfelse> 
    1484                                 <cfset lFields = ListAppend(lFields,aFields[i].name)> 
     1569                        <cfif arguments.select IS "All" OR (structKeyExists(aFields[i],arguments.select) AND aFields[i][arguments.select])> 
     1570                                <cfif structKeyExists(aFields[i],"alias")> 
     1571                                        <cfset lFields = ListAppend(lFields,aFields[i].alias)> 
     1572                                <cfelse> 
     1573                                        <cfset lFields = ListAppend(lFields,aFields[i].name)> 
     1574                                </cfif> 
    14851575                        </cfif> 
    14861576                </cfloop> 
     
    15231613                                hint="I return a list of field aliases for the fields of joined tables to a table."> 
    15241614                <cfargument name="table" type="string" required="Yes" hint="I am the name of the table who's joined tables fields are to be output."> 
    1525                 <cfargument name="type" type="string" required="No" default="" hint="I select the type of field to be displayed, can be List or Form."> 
     1615                <cfargument name="select" type="string" required="No" default="All" hint="The type of field, can be showOnList, showOnForm, showOnDisplay."> 
    15261616                <cfset var i = 0> 
    1527                 <cfset var aFields = getJoinedFieldsFromXML(arguments.table)> 
     1617                <cfset var aJoinedFields = getJoinedFieldsFromXML(arguments.table)> 
    15281618                <cfset var lFields = ""> 
    15291619                 
    1530                 <cfif arguments.type IS "List"> 
    1531                         <cfloop from="1" to="#arrayLen(aFields)#" index="i"> 
    1532                                 <cfif structKeyExists(aFields[i],"showOnList") AND aFields[i].showOnList> 
    1533                                         <cfset lFields = ListAppend(lFields,aFields[i].alias)> 
     1620                <cfloop from="1" to="#arrayLen(aJoinedFields)#" index="i"> 
     1621                        <cfif arguments.select IS "All" OR (structKeyExists(aJoinedFields[i],arguments.select) AND aJoinedFields[i][arguments.select])> 
     1622                                <cfif structKeyExists(aJoinedFields[i],"alias")> 
     1623                                        <cfset lFields = ListAppend(lFields,lFirst(aJoinedFields[i].table) & uFirst(aJoinedFields[i].alias))> 
     1624                                <cfelse> 
     1625                                        <cfset lFields = ListAppend(lFields,lFirst(aJoinedFields[i].table) & uFirst(aJoinedFields[i].name))> 
    15341626                                </cfif> 
    1535                         </cfloop> 
    1536                 <cfelseif arguments.type IS "Form"> 
    1537                         <cfloop from="1" to="#arrayLen(aFields)#" index="i"> 
    1538                                 <cfif structKeyExists(aFields[i],"showOnForm") AND aFields[i].showOnForm> 
    1539                                         <cfset lFields = ListAppend(lFields,aFields[i].alias)> 
    1540                                 </cfif> 
    1541                         </cfloop> 
    1542                 <cfelse> 
    1543                         <cfloop from="1" to="#arrayLen(aFields)#" index="i"> 
    1544                                 <cfset lFields = ListAppend(lFields,aFields[i].alias)> 
    1545                         </cfloop> 
    1546                 </cfif> 
     1627                        </cfif> 
     1628                </cfloop> 
    15471629                 
    15481630                <cfreturn lFields> 
     
    15531635                <cfargument name="table" type="string" required="Yes" hint="I am the name of the table who's joined tables fields are to be output."> 
    15541636                <cfset var i = 0> 
    1555                 <cfset var aFields = getFieldsFromXML(arguments.table)> 
     1637                <cfset var aJoinedObjects = getRelationshipsFromXML(arguments.table,"manyToOne")> 
    15561638                <cfset var aJoinedFields = arrayNew(1)> 
    15571639                 
    1558                 <cfloop from="1" to="#arrayLen(aFields)#" index="i"> 
    1559                         <cfif structKeyExists(aFields[i],"parent")> 
    1560                                 <cfset aJoinedFields = ArrayConcat(aJoinedFields,getFieldsFromXML(aFields[i].parent))> 
    1561                         </cfif> 
     1640                <cfloop from="1" to="#arrayLen(aJoinedObjects)#" index="i"> 
     1641                        <cfset aJoinedFields = ArrayConcat(aJoinedFields,getFieldsFromXML(aJoinedObjects[i].name))> 
    15621642                </cfloop> 
    15631643                 
     
    15791659                        <cfset stData = structNew()> 
    15801660                        <cfset stData["Name"] = xRelationships[i].XmlAttributes.name> 
     1661                        <cfset stData["JoinType"] = iif(structkeyExists(xRelationships[i].XmlAttributes,"fkName"),"'INNER'","'LEFT OUTER'")> 
    15811662                        <cfif structKeyExists(xRelationships[i].XmlAttributes,"alias")> 
    15821663                                <cfset stData["Alias"] = xRelationships[i].XmlAttributes.alias> 
     
    15961677        </cffunction> 
    15971678         
     1679        <cffunction name="getFKFieldList" returntype="string" output="No"  
     1680                                hint="I return a list containing the fields that are foreign keys to tables related to the selected table from the XML Configuration."> 
     1681                <cfargument name="table" required="Yes" hint="I am the name of the table who's realtionships are to be output."> 
     1682                <cfargument name="type" required="Yes" hint="I am the type of relationship required"> 
     1683                <cfset var i = 0> 
     1684                <cfset var j = 0> 
     1685                <cfset var lFKFieldList = ""> 
     1686                <cfset var quotedTable = "'#arguments.table#'"> 
     1687                <cfset var xRelationships = XmlSearch(variables.xScaffoldingConfig,"/scaffolding/objects/object[@name=#quotedTable#]/#arguments.type#")> 
     1688                 
     1689                <cfloop index="i" from="1" to="#arrayLen(xRelationships)#"> 
     1690                        <cfloop index="j" from="1" to="#arrayLen(xRelationships[i].XmlChildren)#"> 
     1691                                <cfset lFKFieldList = ListAppend(lFKFieldList,xRelationships[i].XmlChildren[j].XmlAttributes.from)> 
     1692                        </cfloop> 
     1693                </cfloop> 
     1694                 
     1695                <cfreturn lFKFieldList> 
     1696        </cffunction> 
     1697         
    15981698        <cffunction name="getDottedPath" returntype="string" output="no"  
    15991699                                hint="I return the Path to the model."> 
  • framework/trunk/scaffolder/scaffolder/cftemplate.cfc

    r676 r710  
    111111        </cffunction> 
    112112         
     113        <cffunction name="uFirst" returntype="string" access="public" output="No" hint="I make the first character of a string uppercase"> 
     114                <cfargument name="inString" type="string" required="Yes" /> 
     115                 
     116                <cfreturn UCase(Left(inString,1)) & RemoveChars(inString,1,1)> 
     117        </cffunction> 
     118         
     119        <cffunction name="lFirst" returntype="string" access="public" output="No" hint="I make the first character of a string lowercase"> 
     120                <cfargument name="inString" type="string" required="Yes" /> 
     121                 
     122                <cfreturn LCase(Left(inString,1)) & RemoveChars(inString,1,1)> 
     123        </cffunction> 
     124         
    113125        <cffunction name="generateScript" returntype="void" access="public" output="yes" hint="I generate a script using a CFTemplate and its associated metadata."> 
    114126                <cfargument Name="TemplateFilePath" type="string" required="yes" hint="I am the filepath (including the file name and extension) of the CF Template to return."> 
  • framework/trunk/scaffolder/templates/ColdSpring/ColdSpring.xml

    r676 r710  
    2121        <<cfset oMetaData.setSelectedTable(thisTable)>> 
    2222        <<cfset aRelManyToOne = oMetaData.getRelationshipsFromXML(thisTable,'manyToOne')>> 
    23          
    2423        <<cfset aFields = oMetaData.getFieldsFromXML(thisTable)>> 
    25          
    2624        <bean id="$$oMetaData.getSelectedTableAlias()$$Service"  
    2725                        class="$$oMetaData.getDottedPath(arguments.DestinationFilePath,oMetaData.getProject(),oMetaData.getSelectedTableAlias())$$Service"> 
     
    3230                <constructor-arg name="$$oMetaData.getSelectedTableAlias()$$Gateway"> 
    3331                        <ref bean="$$oMetaData.getSelectedTableAlias()$$Gateway" /> 
     32                </constructor-arg> 
     33                 
     34                <constructor-arg name="$$oMetaData.getSelectedTableAlias()$$Validator"> 
     35                        <ref bean="$$oMetaData.getSelectedTableAlias()$$Validator" /> 
     36                </constructor-arg> 
     37                 
     38                <constructor-arg name="$$oMetaData.getSelectedTableAlias()$$Messages"> 
     39                        <ref bean="$$oMetaData.getSelectedTableAlias()$$Messages" /> 
    3440                </constructor-arg> 
    3541        </bean> 
     
    4955        </bean> 
    5056         
     57        <bean id="$$oMetaData.getSelectedTableAlias()$$Validator" 
     58                class="$$oMetaData.getDottedPath(arguments.DestinationFilePath,oMetaData.getProject(),oMetaData.getSelectedTableAlias())$$Validator"> 
     59                <<cfloop from="1" to="$$arrayLen(aRelManyToOne)$$" index="i">> 
     60                <constructor-arg name="$$aRelManyToOne[i].Alias$$Service"> 
     61                        <ref bean="$$aRelManyToOne[i].Alias$$Service" /> 
     62                </constructor-arg><</cfloop>> 
     63                 
     64        </bean> 
     65         
     66        <bean id="$$oMetaData.getSelectedTableAlias()$$Messages" 
     67                class="$$oMetaData.getDottedPath(arguments.DestinationFilePath,oMetaData.getProject(),oMetaData.getSelectedTableAlias())$$Messages"> 
     68        </bean> 
     69         
    5170        <bean id="$$oMetaData.getSelectedTableAlias()$$Record" 
    5271                class="$$oMetaData.getDottedPath(arguments.DestinationFilePath,oMetaData.getProject(),oMetaData.getSelectedTableAlias())$$Record"> 
    53                  
    5472                <<!--- <<cfloop from="1" to="$$ArrayLen(aRelManyToOne)$$" index="i">> 
    5573                <property name="$$aRelManyToOne[i].alias$$"> 
     
    6280                class="$$oMetaData.getDottedPath(arguments.DestinationFilePath,oMetaData.getProject(),oMetaData.getSelectedTableAlias())$$To"> 
    6381        </bean> 
    64          
    6582<</cfloop>> 
    66          
    6783</beans> 
    6884<</cfoutput>> 
  • framework/trunk/scaffolder/templates/ColdSpring/accessors.cfc

    r676 r710  
    4545 
    4646        <!--- Fields from joined tables ---> 
    47 <<cfloop from="1" to="$$ArrayLen(aJoinedFields)$$" index="i">><<!--- Only add them if they have a unique name --->><<cfif ListFindNoCase(lFields,aJoinedFields[i].alias) EQ 0>><<cfset lFields = ListAppend(lFields, aJoinedFields[i].alias)>> 
    48         <cffunction name="set$$aJoinedFields[i].alias$$" access="package" returntype="void" output="false"> 
    49                 <cfargument name="$$aJoinedFields[i].alias$$" type="any" required="true" /> 
    50                 <cfset variables.instance.$$aJoinedFields[i].alias$$ = arguments.$$aJoinedFields[i].alias$$ /> 
     47<<cfloop from="1" to="$$ArrayLen(aJoinedFields)$$" index="i">><<cfset lFields = ListAppend(lFields, aJoinedFields[i].alias)>> 
     48        <cffunction name="set$$aJoinedFields[i].table$$$$aJoinedFields[i].alias$$" access="package" returntype="void" output="false"> 
     49                <cfargument name="$$aJoinedFields[i].table$$$$aJoinedFields[i].alias$$" type="any" required="true" /> 
     50                <cfset variables.instance.$$aJoinedFields[i].table$$$$aJoinedFields[i].alias$$ = arguments.$$aJoinedFields[i].table$$$$aJoinedFields[i].alias$$ /> 
    5151        </cffunction> 
    52         <cffunction name="get$$aJoinedFields[i].alias$$" access="public" returntype="any" output="false"> 
    53                 <cfreturn variables.instance.$$aJoinedFields[i].alias$$ /> 
    54         </cffunction><</cfif>> 
     52        <cffunction name="get$$aJoinedFields[i].table$$$$aJoinedFields[i].alias$$" access="public" returntype="any" output="false"> 
     53                <cfreturn variables.instance.$$aJoinedFields[i].table$$$$aJoinedFields[i].alias$$ /> 
     54        </cffunction> 
    5555<</cfloop>> 
    5656 
  • framework/trunk/scaffolder/templates/ColdSpring/action_add.xml.cfm