• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Typecasting arraycollection to arraylist in FlexBuilder 3

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic