Changeset 710
- Timestamp:
- 03/29/08 03:48:57 (5 months ago)
- Location:
- framework/trunk/scaffolder
- Files:
-
- 13 added
- 25 modified
-
LICENSE.txt (added)
-
scaffolder/Metadata.cfc (modified) (20 diffs)
-
scaffolder/cftemplate.cfc (modified) (1 diff)
-
templates/ColdSpring/ColdSpring.xml (modified) (4 diffs)
-
templates/ColdSpring/accessors.cfc (modified) (1 diff)
-
templates/ColdSpring/action_add.xml.cfm (modified) (1 diff)
-
templates/ColdSpring/action_update.xml.cfm (modified) (1 diff)
-
templates/ColdSpring/add_form.xml.cfm (modified) (2 diffs)
-
templates/ColdSpring/baseMessages.cfc (added)
-
templates/ColdSpring/baseValidator.cfc (added)
-
templates/ColdSpring/display.xml.cfm (modified) (1 diff)
-
templates/ColdSpring/dsp_display_.cfm (modified) (8 diffs)
-
templates/ColdSpring/dsp_form_.cfm (modified) (15 diffs)
-
templates/ColdSpring/dsp_layout.cfm (modified) (2 diffs)
-
templates/ColdSpring/dsp_list_.cfm (modified) (9 diffs)
-
templates/ColdSpring/edit_form.xml.cfm (modified) (1 diff)
-
templates/ColdSpring/getByFields.cfc (modified) (4 diffs)
-
templates/ColdSpring/getMessage.cfc (added)
-
templates/ColdSpring/getRecordCount.cfc (modified) (3 diffs)
-
templates/ColdSpring/listing.xml.cfm (modified) (1 diff)
-
templates/ColdSpring/messageTextEnUs.cfc (added)
-
templates/ColdSpring/messages.cfc (added)
-
templates/ColdSpring/read.cfc (modified) (4 diffs)
-
templates/ColdSpring/recordInit.cfc (modified) (1 diff)
-
templates/ColdSpring/serviceExists.cfc (added)
-
templates/ColdSpring/serviceGet.cfc (modified) (2 diffs)
-
templates/ColdSpring/serviceGetAll.cfc (modified) (1 diff)
-
templates/ColdSpring/serviceGetMessages.cfc (added)
-
templates/ColdSpring/serviceGetMultiple.cfc (modified) (2 diffs)
-
templates/ColdSpring/serviceGetRecordCount.cfc (modified) (1 diff)
-
templates/ColdSpring/serviceGetSuggest.cfc (added)
-
templates/ColdSpring/serviceInit.cfc (modified) (1 diff)
-
templates/ColdSpring/serviceValidate.cfc (added)
-
templates/ColdSpring/templateDescriptor.cfm (modified) (4 diffs)
-
templates/ColdSpring/validate2.cfc (added)
-
templates/ColdSpring/validator.cfc (added)
-
templates/ColdSpring/validatorInit.cfc (added)
-
templates/Reactor/dsp_display_.cfm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
framework/trunk/scaffolder/scaffolder/Metadata.cfc
r676 r710 273 273 274 274 <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)> 275 287 </cffunction> 276 288 … … 1041 1053 <cfloop query="arguments.qTableData"> 1042 1054 <!--- 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))> 1044 1056 1045 1057 <!--- Set up a pointer to the structure containing the attributes of the field tag in the XML ---> … … 1079 1091 <cfset stProperties = variables.xScaffoldingConfig.scaffolding.objects.object[objectIndex].XmlChildren[thisFieldIndex].XmlAttributes > 1080 1092 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. ---> 1082 1094 <cfset setAttributeValue(stProperties,"sort",arguments.qTableData.key_seq)> 1083 1095 <cfset setAttributeValue(stProperties,"showOnList","true")> 1084 1096 <cfset setAttributeValue(stProperties,"showOnForm","true")> 1097 <cfset setAttributeValue(stProperties,"showOnDisplay","true")> 1085 1098 <cfif arguments.qTableData.nullable> 1086 1099 <cfset setAttributeValue(stProperties,"required","false")> … … 1095 1108 <cfset setAttributeValue(stProperties,"size","15")> 1096 1109 <cfset setAttributeValue(stProperties,"maxlength",8)> 1110 <cfset setAttributeValue(stProperties,"validation","time")> 1097 1111 <cfelseif stProperties.type IS "date"> 1098 1112 <cfset setAttributeValue(stProperties,"formType","Date")> … … 1100 1114 <cfset setAttributeValue(stProperties,"size","15")> 1101 1115 <cfset setAttributeValue(stProperties,"maxlength",11)> 1116 <cfset setAttributeValue(stProperties,"validation","date")> 1102 1117 <cfelseif isDefined("stProperties.parent") AND stProperties.parent IS NOT ""> 1103 1118 <cfset setAttributeValue(stProperties,"formType","Dropdown")> 1104 1119 <cfset setAttributeValue(stProperties,"format","Trim")> 1105 1120 <cfset setAttributeValue(stProperties,"size","1")> 1121 <cfset setAttributeValue(stProperties,"validation","parent")> 1106 1122 <cfelseif stProperties.type IS "boolean"> 1107 1123 <cfset setAttributeValue(stProperties,"formType","Checkbox")> 1108 1124 <cfset setAttributeValue(stProperties,"format","YesNo")> 1109 1125 <cfset setAttributeValue(stProperties,"size","0")> 1126 <cfset setAttributeValue(stProperties,"validation","boolean")> 1110 1127 <cfelseif isDefined("stProperties.identity") AND stProperties.identity> 1111 1128 <cfset setAttributeValue(stProperties,"formType","Hidden")> … … 1117 1134 <cfset setAttributeValue(stProperties,"size","15")> 1118 1135 <cfset setAttributeValue(stProperties,"maxlength",15)> 1136 <cfset setAttributeValue(stProperties,"validation","currency")> 1119 1137 <cfelseif stProperties.fuseDocType IS "integer"> 1120 1138 <cfset setAttributeValue(stProperties,"formType","Text")> … … 1122 1140 <cfset setAttributeValue(stProperties,"size","15")> 1123 1141 <cfset setAttributeValue(stProperties,"maxlength",15)> 1142 <cfset setAttributeValue(stProperties,"validation","integer")> 1124 1143 <cfelseif stProperties.type IS "numeric"> 1125 1144 <cfset setAttributeValue(stProperties,"formType","Text")> … … 1127 1146 <cfset setAttributeValue(stProperties,"size","15")> 1128 1147 <cfset setAttributeValue(stProperties,"maxlength",15)> 1148 <cfset setAttributeValue(stProperties,"validation","real")> 1129 1149 <cfelseif arguments.qTableData.length gt 200> 1130 1150 <cfset setAttributeValue(stProperties,"formType","Textarea")> … … 1138 1158 <cfset setAttributeValue(stProperties,"maxlength",min(arguments.qTableData.length,getBuffer()))> 1139 1159 </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> 1141 1180 </cfloop> 1142 1181 </cffunction> … … 1404 1443 <cfloop index="i" from="1" to="#arrayLen(xFields)#"> 1405 1444 <cfset arrayAppend(aFields,xFields[i].XmlAttributes)> 1406 <cfset aFields[i]["table"] = arguments.table>1445 <cfset aFields[i]["table"] = uFirst(arguments.table)> 1407 1446 <!--- Set default values on missing entries in the XML ---> 1408 1447 <cfif NOT structKeyExists(aFields[i],"alias")> 1409 <cfset aFields[i]["alias"] = aFields[i]["name"]>1448 <cfset aFields[i]["alias"] = lFirst(aFields[i]["name"])> 1410 1449 </cfif> 1411 1450 <cfif NOT structKeyExists(aFields[i],"label")> … … 1418 1457 <cfset aFields[i]["showOnForm"] = "true"> 1419 1458 </cfif> 1459 <cfif NOT structKeyExists(aFields[i],"showOnDisplay")> 1460 <cfset aFields[i]["showOnDisplay"] = "true"> 1461 </cfif> 1420 1462 <cfif NOT structKeyExists(aFields[i],"type")> 1421 1463 <cfset aFields[i]["type"] = "string"> 1464 </cfif> 1465 <cfif NOT structKeyExists(aFields[i],"fuseDocType")> 1466 <cfset aFields[i]["fuseDocType"] = "string"> 1422 1467 </cfif> 1423 1468 <cfif NOT structKeyExists(aFields[i],"formType")> … … 1425 1470 <cfset aFields[i]["formType"] = "Dropdown"> 1426 1471 <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> 1428 1477 <cfelseif aFields[i].type IS "boolean"> 1429 1478 <cfset aFields[i]["formType"] = "Checkbox"> … … 1437 1486 <cfif NOT structKeyExists(aFields[i],"format")> 1438 1487 <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> 1440 1493 <cfelseif aFields[i].type IS "boolean"> 1441 1494 <cfset aFields[i]["format"] = "YesNo"> … … 1448 1501 <cfelse> 1449 1502 <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"> 1450 1537 </cfif> 1451 1538 </cfif> … … 1474 1561 hint="I return a list of field aliases for a table." > 1475 1562 <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."> 1476 1564 <cfset var i = 0> 1477 1565 <cfset var aFields = getFieldsFromXML(arguments.table)> … … 1479 1567 1480 1568 <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> 1485 1575 </cfif> 1486 1576 </cfloop> … … 1523 1613 hint="I return a list of field aliases for the fields of joined tables to a table."> 1524 1614 <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."> 1526 1616 <cfset var i = 0> 1527 <cfset var a Fields = getJoinedFieldsFromXML(arguments.table)>1617 <cfset var aJoinedFields = getJoinedFieldsFromXML(arguments.table)> 1528 1618 <cfset var lFields = ""> 1529 1619 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))> 1534 1626 </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> 1547 1629 1548 1630 <cfreturn lFields> … … 1553 1635 <cfargument name="table" type="string" required="Yes" hint="I am the name of the table who's joined tables fields are to be output."> 1554 1636 <cfset var i = 0> 1555 <cfset var a Fields = getFieldsFromXML(arguments.table)>1637 <cfset var aJoinedObjects = getRelationshipsFromXML(arguments.table,"manyToOne")> 1556 1638 <cfset var aJoinedFields = arrayNew(1)> 1557 1639 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))> 1562 1642 </cfloop> 1563 1643 … … 1579 1659 <cfset stData = structNew()> 1580 1660 <cfset stData["Name"] = xRelationships[i].XmlAttributes.name> 1661 <cfset stData["JoinType"] = iif(structkeyExists(xRelationships[i].XmlAttributes,"fkName"),"'INNER'","'LEFT OUTER'")> 1581 1662 <cfif structKeyExists(xRelationships[i].XmlAttributes,"alias")> 1582 1663 <cfset stData["Alias"] = xRelationships[i].XmlAttributes.alias> … … 1596 1677 </cffunction> 1597 1678 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 1598 1698 <cffunction name="getDottedPath" returntype="string" output="no" 1599 1699 hint="I return the Path to the model."> -
framework/trunk/scaffolder/scaffolder/cftemplate.cfc
r676 r710 111 111 </cffunction> 112 112 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 113 125 <cffunction name="generateScript" returntype="void" access="public" output="yes" hint="I generate a script using a CFTemplate and its associated metadata."> 114 126 <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 21 21 <<cfset oMetaData.setSelectedTable(thisTable)>> 22 22 <<cfset aRelManyToOne = oMetaData.getRelationshipsFromXML(thisTable,'manyToOne')>> 23 24 23 <<cfset aFields = oMetaData.getFieldsFromXML(thisTable)>> 25 26 24 <bean id="$$oMetaData.getSelectedTableAlias()$$Service" 27 25 class="$$oMetaData.getDottedPath(arguments.DestinationFilePath,oMetaData.getProject(),oMetaData.getSelectedTableAlias())$$Service"> … … 32 30 <constructor-arg name="$$oMetaData.getSelectedTableAlias()$$Gateway"> 33 31 <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" /> 34 40 </constructor-arg> 35 41 </bean> … … 49 55 </bean> 50 56 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 51 70 <bean id="$$oMetaData.getSelectedTableAlias()$$Record" 52 71 class="$$oMetaData.getDottedPath(arguments.DestinationFilePath,oMetaData.getProject(),oMetaData.getSelectedTableAlias())$$Record"> 53 54 72 <<!--- <<cfloop from="1" to="$$ArrayLen(aRelManyToOne)$$" index="i">> 55 73 <property name="$$aRelManyToOne[i].alias$$"> … … 62 80 class="$$oMetaData.getDottedPath(arguments.DestinationFilePath,oMetaData.getProject(),oMetaData.getSelectedTableAlias())$$To"> 63 81 </bean> 64 65 82 <</cfloop>> 66 67 83 </beans> 68 84 <</cfoutput>> -
framework/trunk/scaffolder/templates/ColdSpring/accessors.cfc
r676 r710 45 45 46 46 <!--- 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$$ /> 51 51 </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> 55 55 <</cfloop>> 56 56 -
framework/trunk/scaffolder/templates/ColdSpring/action_add.xml.cfm
