Search code examples
extjscoldfusiontoolbarcfgrid

CF 9.0.1 (ExtJs updates?)


I have a cfgrid in one of my "crud" pages, something similar to:

<cfset args = StructNew()>
<cfset args.name = "ProductsGrid">
<cfset args.format = "html">
<cfset args.bindOnLoad = "true">
<cfset args.stripeRows = true>
<cfset args.SELECTColor = "##D9E8FB">
<cfset args.pagesize = 25>

<cfgrid attributeCollection="#args#" autowidth="yes" fontsize="11">
        <cfgridcolumn name="artid" display="false" width="1">
        <cfgridcolumn name="marchio" header="Marchio" width="100">        
</cfgrid>

In addition I created (years ago) this JS to add buttons to my grid's bottom toolbar.

init = function() {
        grid = ColdFusion.Grid.getGridObject("ProductsGrid");
        var tbar = grid.getBottomToolbar();;
        tbar.addButton({text:"Nuovo", handler:onAdd });
        tbar.addSeparator();
        tbar.addButton({ text:"Modifica", handler:onEdit });
    }

ColdFusion.Event.registerOnLoad(init,null,false,true);

Now I updated my CF version to the 9.0.1 (hotfix 1 and 2) and this stopped to work:

the grid IS working fine, indeed, the buttons are NOT created (the init function is called, I tested it).

What's the matter, what's changed?


Solution

  • It could be the two semicolons after your toolbar instantiation.

    var tbar = grid.getBottomToolbar();;