Doug,

I don't know if you can create directly a flex class instance based on a row of 
a cf query.

It's something that I can try it tomorrow for you. Since I'm using FDS and not 
remoting, I can't return direcly queries but remoting shouldn't be a problem. I 
know that there is a metadata tag that allow us do define with object type is 
an array so it should translate it direcly for you. I can test it for you 
tomorrow and if i'm successul, I'l  post the code for you.

Also,I know that using reactor Iterator with getArray() is slow and that's why 
I'm using a custom plugin for this job.
Instead of loading everything, I get my query and then loop over it and create 
my TO's direcly.

I have no speed problems with this.

João Fernandes


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Doug Arthur
Sent: Sat 29-Jul-06 6:00 PM
To: [email protected]
Subject: Re: [Reactor for CF] query as a flex class object
 
Joao,

Reactor aside, shouldn't there be a way to create an object in Flex from a
row in a query? Even trying to loop through them in cf to create an array of
objects is just as slow as using the iterator and getArray method. I would
have thought that I could translate a record from a query to a flex class.

Thanks!



On 7/27/06, João Fernandes <[EMAIL PROTECTED]> wrote:
>
> 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/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
>
>


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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