Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 05/22/2012
Components: AJAX
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final / 289071
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win All
Vote Count: 0
When cfgrid uses the bind attribute, then CF9.0.1 and CF10 differ when handling strings of numbers.
CF9.0.1 treats the string of numbers as, well, a string of numbers. Good. CF10 treats the string of numbers as a floating point number. Not so good. I thought the goal was to prevent strings of numbers from becoming floating point (#74140).
Please see attached image for comparison.
Repro:
index.cfm
-----------
<cfform>
<cfgrid name="myGrid" format="html" width="200" bind="cfc:MyCFC.myFunction({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
<cfgridcolumn name="myString" />
</cfgrid>
</cfform>
MyCFC.cfc
-----------
<cfcomponent output="no">
<cffunction name="myFunction" access="remote" output="no" returntype="struct">
<cfargument name="gridPage" type="numeric" />
<cfargument name="gridPageSize" type="numeric" />
<cfargument name="gridSortColumn" type="string" />
<cfargument name="gridSortDirection" type="string" />
<cfscript>
var myQuery = queryNew("myString", "varchar");
queryAddRow(myQuery, 1);
querySetCell(myQuery, "myString", "9876543210987654321098", 1);
return queryConvertForGrid(myQuery, ARGUMENTS.gridPage, ARGUMENTS.gridPageSize);
</cfscript>
</cffunction>
</cfcomponent>
Actual Result (see attached image): 9.876543210987654e+21
Expected result: 9876543210987654321098
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3196326
External Customer Info:
External Company:
External Customer Name: itisdesign
External Customer Email:
Attachments:
- May 23, 2012 00:00:00: 1_20120517_CFGridBindFloatingPoint.jpg
- June 07, 2012 00:00:00: 2_CFAjaxFloatingPoint.zip
Comments: