Highlighted

Cannot get form values to filter grid in CF11

New Here ,
Aug 31, 2015

Copy link to clipboard

Copied

After upgrading our shared hosting server from CF9 to CF11 all of our grids broke.  I've managed to get the toolbars back with several form elements but those elements' values are not getting passed to the CFC to filter the grid data.  This worked perfectly in CF9. Does any know what may have changed?

javascript Data:

    tbar.add( {
   xtype: 'textfield',
   name: 'searchfield',
   fieldLabel: 'Search'
   },
   {
   xtype: 'comboAge',
   handler: test
   },
   {
   xtype:'button',
   text:"Filter Grid",
   tooltip:"Filter Grid",
   handler:function(){ColdFusion.Grid.refresh('empGrid')}
   },'-->',
   {
   xtype:'button',
   text:"Add User Account",
   tooltip:"Add a user account",
   handler:addUserAccount} 
   );

var getSearch = function() {

    try {                       

        //alert(Ext.getDom('searchfield').value);

        return Ext.getCmp('searchfield').getValue();

    }                

    catch (e) {

    return "";  //return default value in case of error.

    }     

}

GRID CODE:

<cfgrid format="html" name="empGrid" width="800" pagesize=15 sort=true title="Team Database" collapsible="false" insert="yes" delete="yes" bind="cfc:grid.getAllTeams({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},getSearch())">

        <cfgridcolumn name="TeamID" display="true" header="ID" />

        <cfgridcolumn name="TeamName" display="true" header="Team Name"/>

        <cfgridcolumn name="Age" display="true" header="Age"/>

    </cfgrid>

Views

301

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Cannot get form values to filter grid in CF11

New Here ,
Aug 31, 2015

Copy link to clipboard

Copied

After upgrading our shared hosting server from CF9 to CF11 all of our grids broke.  I've managed to get the toolbars back with several form elements but those elements' values are not getting passed to the CFC to filter the grid data.  This worked perfectly in CF9. Does any know what may have changed?

javascript Data:

    tbar.add( {
   xtype: 'textfield',
   name: 'searchfield',
   fieldLabel: 'Search'
   },
   {
   xtype: 'comboAge',
   handler: test
   },
   {
   xtype:'button',
   text:"Filter Grid",
   tooltip:"Filter Grid",
   handler:function(){ColdFusion.Grid.refresh('empGrid')}
   },'-->',
   {
   xtype:'button',
   text:"Add User Account",
   tooltip:"Add a user account",
   handler:addUserAccount} 
   );

var getSearch = function() {

    try {                       

        //alert(Ext.getDom('searchfield').value);

        return Ext.getCmp('searchfield').getValue();

    }                

    catch (e) {

    return "";  //return default value in case of error.

    }     

}

GRID CODE:

<cfgrid format="html" name="empGrid" width="800" pagesize=15 sort=true title="Team Database" collapsible="false" insert="yes" delete="yes" bind="cfc:grid.getAllTeams({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},getSearch())">

        <cfgridcolumn name="TeamID" display="true" header="ID" />

        <cfgridcolumn name="TeamName" display="true" header="Team Name"/>

        <cfgridcolumn name="Age" display="true" header="Age"/>

    </cfgrid>

Views

302

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 31, 2015 0
Most Valuable Participant ,
Sep 02, 2015

Copy link to clipboard

Copied

Hi MusicManMD,

I've posted a comment on your ticket 4048126 containing a workaround (bind to a hidden input).

Thanks!,

-Aaron

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 02, 2015 0