You can also implement mapping like this
=
1. AS VO
--
Class TestVO
{
public var test1 : String;
public var test2 : Array;
function TestVO ()
{
Object.registerClass ( testVO, TestVO );
I was about to post a question on 'Using Value Objects
with CFC' and your example explains it all.
Thanks again.
Mohanraj
--- Mehdi, Agha [EMAIL PROTECTED] wrote:
You can also implement mapping like this
=
1.AS VO
--
Class TestVO
I believe the solution Dirk provided solves this problem as well.
That is, in addition to Mehdi's initial solution #2:
remoteObject.cfFunction ( toPass, true );
You can use named argument syntax:
remoteObject.cfFunction({arg1:toPass});
Where arg1 is also the name of the argument in the CFC
Thanks Paul. This seems to be a complex project and I
am having a hard time following it. I wish they had a
simple example. But I am still experimenting with
ValueObject.cfc and hope I can get this done pretty
soon.
--- Paul Kenney [EMAIL PROTECTED] wrote:
At work we figured out how to do
The history of this problem stems way back from Flash Remoting in
ColdFusion 6.0.
ActionScript 1.0 APIs for Flash Remoting introduced named arguments
for CF-based invocation. The syntax for passing named arguments was
usually listed like this in documentation:
Thanks Peter for the explanation. That explains it. I am glad it worked
Mohanraj.
There's one more way of doing it without having to specify the other
argument.
var testObject = new Array(); // it has to be an array. It won't work if
you did new Object()
testObject[var1] = var1;
Thanks for the explantion Peter. That really helps.
Mehdi thanks for yet another Tip.
It works in FLEX.
Mohanraj
--- Mehdi, Agha [EMAIL PROTECTED] wrote:
Thanks Peter for the explanation. That explains it.
I am glad it worked
Mohanraj.
There's one more way of doing it without having to
Hi Mohanraj,
CF needs named parameters when dealing with complex types passed as CFC
arguments. You have to wrap the object you want to send to the CFC into another
wrapper object. Inside the wrapper you define properties for every named
argument. This should work:
// AS snippet
//
Hi Dirk,
Thanks for your suggestion. But my condition differs
from your example.
Lets assume I had an AS Class 'MyClass.as'
I am trying to do something like this in my MXML
var o:Object = new MyClass();
I build an 'array of structures' in MyClass Object
and I do pass the complex Object as
At work we figured out how to do this a little while back for the
Tartan Framework (http://www.tartanframework.org). If you download the
code, take a look at the file /tartan/vo/ValueObject.cfc, and in
particular the getFlashRemotingData() and setFlashRemotingData()
methods.
On Thu, 24 Mar
Mohanraj,
I learned it the hard way. There are two ways to do it.
1.
Flex side:
var toPass = new MyClass();
toPass.var1 = value;
toPass.var2 = value;
remoteObject.cfFunction ( toPass );
CF Side:
cffunction name=cfFunction access=remote
cfargument name=var1
cfargument
Hi All,
I've been trying to pass an AS Object to a Coldfusion
CFC thorough FLEX RemoteObject calls. But I havent
found any success so far.
I knew there are examples provided my Macromedia for
exchanging complex objects
(http://www.macromedia.com/devnet/flex/articles/complex_data_03.html)
, but
Hi Clint,
Thanks for your reply. I think i was not clear ealrier
on my problem. Here's a sample code I am dealing with.
Please note the property 'modarray' of the 'pData'
object.
'modarray' is populated with SelTP object _s whcih is
an Array of Structures. Here I polupate the _s with
13 matches
Mail list logo