Coldfusion returning typed objects / AMF remoting

Posted by Chin on Stack Overflow See other posts from Stack Overflow or by Chin
Published on 2010-05-26T09:09:31Z Indexed on 2010/05/26 9:11 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

Is the same possible in ColdFusion? Currently I am using .Net/Fluorine to return objects to the client. Whilst in testing I like to pass strings representing the select statement and the custom object I wish to have returned from my service. Fluorine has a class ASObject to which you can set the var 'typeName'; which works great. I am hoping that this is possible in Coldfusion. Does anyone know whether you can set the type of the returned object in a similar way. This is especially helpful with large collections as the flash player will convert them to a local object of the same name thus saving interating over the collection to convert the objects to a particular custom object.

 foreach (DataRow row in ds.Tables[0].Rows)
            {
                ASObject obj = new ASObject();

                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    obj.Add(col.ColumnName, row[col.ColumnName]);
                }
                obj.TypeName = pObjType;
                al.Add(obj);
            }

Many thanks,

© Stack Overflow or respective owner

Related posts about flex

Related posts about flash