File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Typecasting arraycollection to arraylist in FlexBuilder 3

 
Rohit kumar sharma
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).

 
Narender Reddy Soma
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic