-
Notifications
You must be signed in to change notification settings - Fork 2
/
genCodes.cfm
22 lines (22 loc) · 975 Bytes
/
genCodes.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<cfset codeGenerator = CreateObject("component", "cfcs.services.codeGenerator").init(#url.table#,#url.datasource#,#url.revTable#,#url.pathType#,#url.cf8#,#url.useRTE#) />
<cfif url.method EQ "bean">
<cfset getCode = codeGenerator.generateBean()>
<cfelseif url.method EQ "dao">
<cfset getCode = codeGenerator.generateDAO()>
<cfelseif url.method EQ "gateway">
<cfset getCode = codeGenerator.generateGateway()>
<cfelseif url.method EQ "controller">
<cfset getCode = codeGenerator.generateController()>
<cfelseif url.method EQ "datatable" or url.method EQ "datagrid">
<cfset getCode = codeGenerator.generateDatatable()>
<cfelseif url.method EQ "form">
<cfset getCode = codeGenerator.generateForm()>
<cfelseif url.method EQ "application">
<cfset getCode = codeGenerator.generateApplicationCFC()>
<cfelse>
<cfset getCode = "Could not find specified method">
</cfif>
<cfset getCode = replaceList(getCode,"<%,%,^","<,##,%") />
<cfoutput>
<pre>#getCode#</pre>
</cfoutput>