Adobe Dreamweaver Forums



Last 10 THreads :         DIV in Table not working. (Last Post : adambaum - Replies : 2 - Views : 3 )           »          SWF slide show does not play (Last Post : hammerkp - Replies : 4 - Views : 5 )           »          Adobe Flash 10 kills Wimpy (Last Post : midiwriter - Replies : 81 - Views : 949 )           »          How to align XML loading text to right (Last Post : Boxing Boom - Replies : 6 - Views : 7 )           »          Why is this not working!!! (Last Post : Boxing Boom - Replies : 8 - Views : 9 )           »          Referencing stage.stageWidth from a class (Last Post : 60Day - Replies : 2 - Views : 3 )           »          XML image gallery problem (Last Post : 2le - Replies : 3 - Views : 4 )           »          ProgressBar and myPlayer (Last Post : W_Bell - Replies : 0 - Views : 1 )           »          Kintana Dummy Page (Last Post : KiahMom - Replies : 2 - Views : 3 )           »          Re: Unable to Edit Text Captions (Last Post : cegrubb - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: ,



Reply
  #1 (permalink)  
Old 08-27-2008, 04:47 PM
Ventis85
 
Posts: n/a
Diggs:
Default How to cast an ArrayCollection in an ArrayCollection

Hi everyone,

currently I'm working on a Flex-Java project. Repeatedly I've received a List
from the Java-side which I always cast as an ArrayCollection because List is a
Control in Flex. This has always worked perfectly.

However, now we find ourselves in the situation were I'm passed a List from
Java with Lists inside it. When I cast my result as an ArrayCollection:
nameArrayCollection = event.result as ArrayCollection
it gives me an ArrayCollection with Objects in it, which contain all fields
except the list inside the objects.

Unless someone has another explanation for this, I think it's because I don't
cast the lists in the List as an ArrayCollection, so it simply gets ignored
during decoding because Flex doesn't know a List (besides the control).

Any ideas about how I can cast the lists inside the ArrayCollection as
ArrayCollections, or any other solutions?

Thx in advance



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-27-2008, 10:12 PM
ntsiii
 
Posts: n/a
Diggs:
Default Re: How to cast an ArrayCollection in an ArrayCollection

You will probably need to loop over your main array and manually build an arrayCollections of arrayCollections.
Tracy
Reply With Quote
  #3 (permalink)  
Old 08-28-2008, 09:23 AM
Ventis85
 
Posts: n/a
Diggs:
Default Re: How to cast an ArrayCollection in an ArrayCollection

Doesn't work cause the ArrayCollections in the main ArrayCollection are null.
I'm not getting any values from the nested arrayCollections yet the values are
passed through by Java as I confirmed with a unittest.

Reply With Quote


  #4 (permalink)  
Old 08-28-2008, 01:36 PM
Ventis85
 
Posts: n/a
Diggs:
Default Re: How to cast an ArrayCollection in an ArrayCollection

Problem solved. Apparently BlazeDS expects a getter and a setter for each property in a VO on the java-side. Even when a setter is not necessary. Bit of a security issue but solvable.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:12 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk