0

カスタム タグは、属性の 1 つで「クエリ」を想定していますが、ダンプすると、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>
4

0 に答える 0