Sending datagrids arraycollection to Java Servlet

I have an arraycollection in datagrid and i want to pass it to the servlet using . Is there any way to do that? Here my problem is, i can send arraycollection through SEND() of HTTPSERVICE, but when to receive it in HTTPRequestObject of servlet, request.getParameter('paramName') will return String. So how can i receive the same arraycollection from flex to the servlet's request object?



public var dataAC:ArrayCollection = new ArrayCollection();

will be my variable to hold arraycollection.

When i am doing this,

mx:HTTPService id="fileformatServlet" result="fileformatServlet_resultHandler(event)" fault="fileformatServlet_faultHandler(event)" showBusyCursor="true"

and fileformatServlet.send("arrayCollection":dataAC);

Now on java side, request.getparameter("arrayCollection") will return a string not an arraycollection.Typecast is also not possible.

so what should i do now?


Http request parameters are always pass as String. You have to serialize the Array in some format.

For example you can use Json forma t and deserialize it in java. FlexJavaJson

Need Your Help

Template function lookup

c++ templates

Consider this piece of code:

APNS € and ¢ and $ signs

php character-encoding apple-push-notifications

I'm trying to send a push notification containing a special character (like €, ¢ or $). But the message eventually appears like: € => Û. What is the script doing:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.