OK, I've got a simplified working example for you.
I took your MXML and AS code and basically used it as-is (the only
thing I modified was to change trace() to Alert.show() in the
resultHandler function). Then I added the following files within my
test application (running at http://localhost/flexTest/):
/flexTest/controller.UserController.cfc
========================================
<cfcomponent extends="ModelGlue.gesture.controller.Controller"
output="false" hint="I am a Model-Glue controller.">
<cffunction name="GetUser" access="public" output="false"
returntype="void">
<cfargument name="event" type="any" required="true" />
<cfset var UserID = arguments.event.getValue("UserID") />
<cfset var user = createObject("component",
"flexTest.model.users.UsersVO").init() />
<cfset user.UserID = UserID />
<cfset user.Name = "Test User" />
<cfset arguments.event.setValue("user", user) />
</cffunction>
</cfcomponent>
/flexTest/model/users/UsersVO.cfc
========================================
<cfcomponent alias="model.users.UsersVO" output="false">
<cfproperty name="UserID" type="numeric" />
<cfproperty name="Name" type="string" />
<cfset this.UserID = 0 />
<cfset this.Name = "" />
<cffunction name="init" access="public" output="false"
returntype="flexTest.model.users.UsersVO">
<cfreturn this />
</cffunction>
</cfcomponent>
/flexTest/flex/model/users/UsersVO.as
========================================
package model.users
{
[RemoteClass(alias="flexTest.model.users.UsersVO")]
[Bindable]
public class UsersVO {
public var UserID:Number = 0;
public var Name:String = "";
public function UsersVO() {}
}
}
When I run this, the alert pop-up displays:
(Object)#0
address = ""
user = (Object)#1
Name = "Test User"
UserID = 1
HTH,
--
Ezra Parker
On Sat, Feb 6, 2010 at 10:11 PM, Jeremy Rottman <[email protected]> wrote:
> You are correct I am running Coldfusion 9.
>
> When I use static values like <cfset var uCollection['UserID'] = 1>
> in the coldfusion code. The results returned are as to what I would
> expect.
>
> All the code that I am testing with is the exact same:
>
> Here is my entire as code:
>
> import model.users.UsersVO;
>
> import mx.controls.Alert;
> import mx.rpc.events.FaultEvent;
> import mx.rpc.events.ResultEvent;
> import mx.utils.ObjectUtil;
>
> private var value:UsersVO;
>
>
>
> private function resultHandler(event:ResultEvent):void{
> trace(ObjectUtil.toString(event.result));
> }
>
> private function faultHandler(event:FaultEvent):void{
> Alert.show(event.fault.toString());
> }
>
> private function clickTest():void{
> value = new UsersVO();
> value.UserID = 1;
>
> MGService.executeEvent('get.user',value,'user,address');
> }
>
> If use the code above and the GetUser method in my previous post as
> is. I am returned two empty strings.
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en