我的自定义标记需要在其中一个属性中使用“查询”,但是当我转储它时,我的cfc函数会返回结构。这是我的函数listScores()
<cffunction name="listScores" access="public" output="false" returntype="any"> <!--- not really scores, should probably rename this function - something to consider --->
<cfargument name="link" type="string" required="false" />
<cfargument name="linktype" type="numeric" required="false" default="2" /> <!--- 2 = ace inspection -> ace action--->
<cfargument name="reftype" type="numeric" required="false" default="2" /> <!--- 2 = equipment --->
<cfargument name="siteid" type="numeric" required="false" />
<cfargument name="archived" type="numeric" required="false" default="0" /> <!--- 0 = not archived --->
<cfargument name="acerefid" type="numeric" required="false" hint="ace_links refid" />
<cfargument name="apprefid" type="numeric" required="false" hint="equip tracker refid" />
<cfargument name="responseType" type="string" require="false" />
<cfif structKeyExists(arguments,'responseType') && arguments.responseType is 'query'>
<cfreturn OCRUD.listScores(argumentCollection=arguments) />
</cfif>
<cfreturn getArrayFromQuery(OCRUD.listScores(argumentCollection=arguments)) />
</cffunction>
当我转储iEngine.listScores()时,我得到结构输出。
我想将此iEngine.listScores()数据传递给需要查询的自定义标记。
<cfmodule template="#request.library.customtags.virtualpath#excel.cfm" file="#filename#" sheetname="ACE Report">
<cfmodule template="#request.library.customtags.virtualpath#exceldata.cfm"
query="#variables.qlistScoreData#"
action="AddWorksheet"
sheetname="ACE Report"
colorscheme="blue"
useheaders="true"
contentformat="#{bold=true}#"
<!--- customheaders="#ListScore#" --->
>
<cfoutput>Excel Extract - ACE Report - #DateFormat(Now(),"d-mmm-yyyy")#</cfoutput>
</cfmodule>
</cfmodule>