Doug,

Reactor TO's won't work with Flex 2 as they are, you have to move the 
<cfproperty tags from the project to the custom TO's file.
The best you can do to speed it up is to create a plugin to convert a query to 
an array of TO's without loading the record.

João Fernandes


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Doug Arthur
Sent: Fri 28-Jul-06 12:13 AM
To: [email protected]; [email protected]
Subject: [Reactor for CF] query as a flex class object
 
Isn't there a way to populate a dataGrid with a query returned from cf and
then reference the selectedItem as a existing Flex Class? When I try to do
this, it does not work. Any Ideas?

var myClassObj:myClass = myDataGrid.selectedItem as myClass;
The attributes on myClassObj would not be populated or even accessible.


More explained for the reactor group:
What I currently have to do is return an array of objects by using the
iterator, I want to get away from that and use a gateway. Below is my actual
code...

*Currently Returning (which is EXTREMELY slow):*
var result = ArrayNew(1);
iterator = Variables.beanFactory.getBean('reactorFactory').createIterator(
'vendor_orders');
iterator.getWhere().IsEqual('vendor_orders', 'vendor_id',
arguments.vendor_id).IsIn('vendor_orders', 'status', '0,1,3');
objArray = iterator.getArray();
for(i=1;i lte ArrayLen(objArray);i=i+1) {
ArrayAppend(result, objArray[i]._getTo());
}
return result;


*What I want to return:*
var result = "";
gateway = Variables.beanFactory.getBean('reactorFactory').createGateway(
'vendor_orders');
query = gateway.createQuery();
query.getWhere().IsEqual('vendor_orders', 'vendor_id', arguments.vendor_id
).IsIn('vendor_orders', 'status', '0,1,3');
result = gateway.getByQuery(query);
return result;


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

<<winmail.dat>>

Reply via email to