HI,

first, there are some typos in your code

  infoArray .addItem(>>activity<<);

 var >>userIfno<< : UserInfoVO = new UserInfoVO();

second, check that the received array has correctly casted objects
(UserInfoVO ), perhaps you don't have if correctly configured. Note
that the second time you are not relying on flex to do the correct
casting.



On 8/2/05, Shahnavaz Alware <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> I am having a problem passing action script VOs to the backend using an
> Array.  Can someone tell me what I am missing here... 
> 
>   
> 
> Here is an example of what I am trying to do: 
> 
>   
> 
> First I get an array of VOs from the backend.... 
> 
>   
> 
> public function onResult(event:Object) : Void { 
> 
>   var infoArray : Array = event.result; 
> 
> . 
> 
> . 
> 
> . 
> 
> } 
> 
>   
> 
> Then later I call the backend and pass back the array of VOs and this
> DOESN'T work because I get a class cast exception... 
> 
>   
> 
> public function saveUserInfo(userInfoArray : Array) : Void { 
> 
>   
> 
>   var call:Object = service.save(userInfoArray); 
> 
>   
> 
> } 
> 
>   
> 
> However, if I do the same thing, but create an array of new VOs and transfer
> all the values, this DOES work.... 
> 
>   
> 
> public function saveUserInfo(userInfoArray : Array) : Void { 
> 
>   var infoArray : Array = new Array(); 
> 
>   
> 
>   for (var i in userInfoArray) { 
> 
>   var userIfno : UserInfoVO = new UserInfoVO(); 
> 
>                         
> 
>   userIfno.oid = userInfoArray[i].oid; 
> 
>   userIfno.name = userInfoArray[i].activityId; 
> 
>                           
> 
>   infoArray .addItem(activity); 
> 
>   
> 
>   var call:Object = service.save(infoArray); 
> 
>   
> 
> } 
> 
>   
> 
>   
> 
> I don't understand exactly what the problem is here, can anyone give insight
> to this issue? 
> 
>   
> 
>   
> 
> Thanks, 
> 
>   
> 
> Dave 
> 
>  --
>  Flexcoders Mailing List
>  FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>  Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> 
>  
> 
>  
>  SPONSORED LINKS 
>  Computer software testing Macromedia flex Development 
>  Software developer 
>  
>  ________________________________
>  YAHOO! GROUPS LINKS 
>  
>  
>  Visit your group "flexcoders" on the web.
>   
>  To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>   
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
>  
>  ________________________________
>  


-- 
::::: Aldo Bucchi :::::
mobile (56) 8 429 8300


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hp5s752/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123026696/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to