Here is my flash remoting response handler:
var responseHandler = {};
responseHandler.onResult = function( results: Object ):Void
{
sel_bank_account_id.labelField = "bank_account_setup_name"; //
display
sel_bank_account_id.dataField = "bank_account_id"; // value
sel_bank_account_id.dataProvider = results; // bind to the query
}
As you can see, I tell the cfselect what columns in the query to use for
display and value. I don't have the opportunity to specify any
formatting at this point, only the column name.
Your approach would still be possible, but I would need to loop over the
list in action script to do the formatting BEFORE binding it to the
dataProvider, but if I am going to have to do an extra loop for the sole
purpose of formatting, I might as well make the web server do it (in the
CFC) to reduce the amount of work the user's PC has to do.
Thanks for the suggestion, though.
~Brad
-----Original Message-----
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 24, 2006 11:52 AM
To: CF-Talk
Subject: RE: substring in q of q
Could you not use a formatting function in ActionScript to do the
trimming?
I'm not sure of the details with Flash Forms in CF, but in Flash I've
used
them. It's been a while, but the basics are, you supply a function
that's
applied to the data before display. In your case it'll look something
like:
function left(str) {
return str.substring(0,3);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230339
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54