1

リモート cfc にバインドされた cfselect ステートメントがあります。フォーム内の別の要素の値を cfc に渡して、cfselect に入力します。cfdebug を有効にしてこのコードを実行したところ、正常に動作しているように見えましたが、cfdebug を有効にしないと何も入力されないことがわかりました。私が知っている他のエラーは発生していません。クロムとモジラで試しました-同じ問題です。

これが私のcfselectです:

<cfselect name="intlRepID" id="intlRepID" required="yes" value="userID" display="businessName" bind="cfc:nsmg.extensions.components.user.getIntlRepRemote({programID})" bindonload="true" />

ここに私のリモート機能があります:

<cffunction name="getIntlRepRemote" access="remote" returntype="array" output="false" hint="Gets a list of Intl. Reps. assigned to a candidate">
    <cfargument name="programID" default="" hint="Get Intl. Reps. Based on a list of program ids">

    <cfscript>
        // Define variables
        var qGetIntlRepRemote='';
        var result=ArrayNew(2);
        var i=0;
    </cfscript>

    <cfquery 
        name="qGetIntlRepRemote" 
        datasource="#APPLICATION.DSN#">
            SELECT
                u.userID,
                u.businessName
            FROM 
                smg_users u
            INNER JOIN
                smg_students s ON s.intRep = u.userID
            WHERE
                s.companyid = <cfqueryparam cfsqltype="cf_sql_integer" value="#CLIENT.companyid#">
            <cfif LEN(ARGUMENTS.programID)>
                AND 
                    s.programID IN ( <cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.programID#" list="yes"> )
            </cfif>
            AND
                s.active = <cfqueryparam cfsqltype="cf_sql_integer" value="1">
            GROUP BY
                u.userID
            ORDER BY
                u.businessName
    </cfquery>

    <cfscript>
        // Add default value
        result[1][1]=0;
        result[1][2]="---- All - Total of " & qGetIntlRepRemote.recordCount & " International Representatives ----" ;

        // Convert results to array
        For (i=1;i LTE qGetIntlRepRemote.Recordcount; i=i+1) {
            result[i+1][1]=qGetIntlRepRemote.userID[i];
            result[i+1][2]=qGetIntlRepRemote.businessName[i];
        }

        return result;
    </cfscript>
</cffunction>
4

0 に答える 0