House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 05, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Search over 2,500 ColdFusion resources here  >>>      
Home / Groups / ColdFusion Talk (CF-Talk)

Flex problem with Coldfusion 8

Author:
Rick Root
10/16/2007 02:55 PM

I posted this problem to flex@houseoffusion.com a week or so ago but I haven't gotten a solution yet.  So I'm trying flexcoders and cf-talk.... I have an application that doesn't seem to be working properly. Basically, I've got a query (in coldfusion 8) that returns a few columns directly to flex via a remoteobject call. Some of the columns are DECIMAL(10,2). Flex is interpreting the results as strings instead of numbers, so sorting data in my datagrid is failing to work properly. Here's my query (in cf): select        DISTINCT        GIFTAB1.ENTITY_ID,        'J. Q. Public' AS PREFERRED_NAME,        GIFTAB1.CREDTDAT,        CAST(GIFTAB1.LEGCRAMT AS money) AS LEGCRAMT,        GIFTAB1.SOFTAMT FROM ... Note that I'm casing LEGCRAMT to money, while I'm leaving SOFTAMT as the regular type DECIMAL(10,2). My response handler in the Flex app: private function getMatchingGivingResult2(e:ResultEvent):void {        var data = ArrayCollection(e.result);        dgGivingHistory.dataProvider=data;        refreshDataProvider(); } If I put a break in there, I see the contents of data, and both SOFTAMT and LEGCRAMT are strings.   CREDTDAT is a date, as it should be. What's going on here?  I need flex to understand that LEGCRAMT and SOFTAMT are numbers, not strings, so that when those numbers are sorted in the datagrid, they are sorted correctly. Thanks. -- Rick Root Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at www.opensourcecf.com


Mailing Lists