aspose file tools*
The moose likes Flex and the fly likes Typecasting arraycollection to arraylist in FlexBuilder 3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Typecasting arraycollection to arraylist in FlexBuilder 3" Watch "Typecasting arraycollection to arraylist in FlexBuilder 3" New topic
Author

Typecasting arraycollection to arraylist in FlexBuilder 3

Rohit kumar sharma
Greenhorn

Joined: Apr 19, 2010
Posts: 16
hello everyone......I am using flex Builder3
Application details

Front end:Flex builder 3

Back end: Blazeds,Servlets

When i m sending arraylist from servlets to flex,i am unable to type casting it in arraycollection.(I have to work flex builder 3,as most of the project is based on flex builder 3)

It is showing null pointer error...

How can i collect arraylist(sent from server) in arraycollection on flex side(cleint).


rohit kumar sharma
Narender Reddy Soma
Greenhorn

Joined: Jun 05, 2010
Posts: 23
Rohit kumar sharma wrote:hello everyone......I am using flex Builder3
Application details

Front end:Flex builder 3

Back end: Blazeds,Servlets

When i m sending arraylist from servlets to flex,i am unable to type casting it in arraycollection.(I have to work flex builder 3,as most of the project is based on flex builder 3)

It is showing null pointer error...

How can i collect arraylist(sent from server) in arraycollection on flex side(cleint).



say for e.g you have arraylist in myDto.java and you want to return to client.

you need equivalent bindable Dto with a property of type ArrayCollection.

if you have arraylist in map and you want to hold it in arraycollection.

try var arrcoll:ArrayCollection = myMap["myList"] as ArrayCollection;

if you want to hold in Array.

try var arr:Array = (myMap["myList"] as ArrayCollection).source;
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Typecasting arraycollection to arraylist in FlexBuilder 3
 
Similar Threads
Flex 3 with Java
Question for Flex Authors (or others) on Web Service
Pass ArrayCollection from Flex to Java
Beginning Java and Flex: Wich version of flex is this book based on? Do you use flex SDK, flex build
writing to CSV file from a servlet