Coldfusion 如何将函数的数据传递给自定义标记属性

Coldfusion 如何将函数的数据传递给自定义标记属性,coldfusion,cfc,cffunction,Coldfusion,Cfc,Cffunction,我的自定义标记期望在其中一个属性中有一个“查询”,但当我转储它时,我的cfc函数会返回结构。这是我的函数listScores() 当我转储iEngine.listScores()时,我得到结构输出 我想将此iEngine.listScores()数据传递给需要查询的自定义标记 <cfmodule template="#request.library.customtags.virtualpath#excel.cfm" file="#filename#" sheetname="ACE Re

我的自定义标记期望在其中一个属性中有一个“查询”,但当我转储它时,我的cfc函数会返回结构。这是我的函数listScores()


当我转储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>


总之,您有一个需要转换为查询的结构?查看OCRUD.listScores()的代码:关于@duncan的评论,不一定。如果结构是从查询生成的,那么将其转换回查询将比不首先生成结构的效率低。
<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>