HTML CFGRID binding does not work in Coldfusion 11

OK, so I spent the last couple of days researching this problem on various sites, including this one, and I'm still not getting any closer to the answer. I saw allegations that this was a mistake and was fixed at the end of Adobe in one of the CF11 fixes, and I even saw one answer stating that Adobe emailed the fix directly to people - although there’s no information on how make adobe it was done on this web page.

We simply upgraded our intranet to Coldfusion 11 and cfgrid pages using the HTML format and linked cfc data that no longer displays cfgrid on the page. Other pages that use the Flash format with cfgrid (which apparently cannot use the bind attribute with Flash) work. These HTML cfgrid pages worked correctly in Coldfusion 9 before we moved the transition to 11.

I simplified the code as much as possible to eliminate the other possibilities of the error - for example, I removed the formatting and pulled out just a couple of columns from the database. Here is the code that I am currently working on in my isolated sandbox dev:

<cfgrid format="html"
        name="userGrid"
        bind="cfc:editorFunc.getGridData({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
        pagesize="20">
            <cfgridcolumn name="REGION" header="Region">
            <cfgridcolumn name="managmentArea" header="Management Area">
</cfgrid>

Here is the code in cfc (the request displays the results when dumping to the page):

    <cffunction name="getGridData" access="remote">
    <cfargument name="page">
    <cfargument name="pageSize">
    <cfargument name="gridsortcolumn">
    <cfargument name="gridsortdir">

    <cfquery name="records" datasource="webData">
    SELECT REGION, managmentArea
    FROM areaDesc
    ORDER BY Region ASC
    </cfquery>

     <cfset result = queryConvertForGrid(duplicate(records), arguments.page, arguments.pagesize)>
     <cfreturn result>
</cffunction>

- , cfgrid CF11? JQuery, JGrid, , .

.

+4
1

.

<cfif not len(trim(arguments.gridsortcolumn))>        
    <cfset arguments.gridsortcolumn = "REGION">
    <cfset arguments.gridsortdir = "desc">   
</cfif>

....

ORDER BY # arguments.gridsortcolumn # # arguments.gridsortdir #

-1

Source: https://habr.com/ru/post/1618505/


All Articles