|
dataProvider should come through as
java.util.List and it should contain either ASObjects or instances of your custom
VO. It looks like somehow the class registration that you have isn’t
working. Make sure that your Object.registerClass call is correct. You can
see in your AMF dump that there is no class type in the objects being passed so
there must be a problem there. Make sure that you have a typed reference to
your AS VO class somewhere to make sure it’s being linked in. e.g., in your MXML application: <mx:Script> var dummy : MyASVOClass; </mx:Script> HTH, Matt From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Doodi, Hari - BLS CTR Hi Matt or other flex gurus/developers
Based on the mail you sent below I need clarifications on ... (1) When you pass dataprovider as a parameter to RemoteObject method,
will this be treated as ASObject or an array of VOs ? (2) When I pass dataprovider as is to as the argument to my Java Class
method with java.util.List as input argument I found List is null. When I
display the following info System.out.println("saveList.get(i) :
"+saveList.get(i).getClass()); I got flashgateway.io.ASObject. So is there any way to convert
ASObject to custome VO in POJO. When I tried to cast it to custom VO I got an
error occurred during service invocation. Thanks! -----Original Message----- You can't create a
strongly typed array. You just do Array (think of it like a
java.util.ArrayList). I've gotten lost as to what the problem is
here. You received the array of data, you modify it in the DataGrid, now
you want to send the data back. So you can simply pass the dataProvider
as the argument to your Java class right? Write a save method that takes
a java.util.List as the parameter and call it in AS passing in the
dataProvider. Now I'm guessing that the
problem is that those objects you pass back are not your EmployeeVO object but
instead ASObject? So you need to make sure you do registerClass or
_remoteClass as described in the documentation or the Flex book. That way
you'll get back to having strongly typed objects and you'll be good to go. Matt From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Doodi, Hari - BLS CTR Thanks for the advice and
clue. I did check the NetworkMonitor and found that array has values as shown
below. In the example
RestaurantFinder, he is getting individual values from the textinput controls and
assigning them to VO attributes. My case is, I don't have any textinput
controls. What I have on my screen is a editable datagrid. And I don't want to
get values from each cell and assign them to vo( if there is no other way then
I have to do this). Come on, there are some
excellent Flex gurus out there Did any one achieved saving data from editable
datagrid on to database? I am desperate to solve this ASAP. I will be very
thankful if some one post code for this. Also how to declare, in
flex, an array of type employeeVO? Something like this .... var
employeeVOArray:EmployeeVO = new Array( ); I got compilation error
saying found Array where expecting EmployeeVO... Please help me out.. Method: gov.bls.ppi.janus.rsgp.manageschedules.controllers.MngScheduleController.saveSchedAdj Parameter 1: name : param1 value[array] : length[Number] : 5 [0][object] : adj_amt_terms_desc[String] :
15.0 10 Days/Net 60 Days 8 [1][object] : adj_amt_terms_desc[String] :
15.0 10 Days/Net 60 Days Test 2 [2][object] : adj_amt_terms_desc[String] :
15.0 10 Days/Net 60 Days Changed [3][object] : adj_amt_terms_desc[String] :
Values New and Modified [4][object] : adj_amt_terms_desc[String] :
Values/Term 200411 Thanks! Yahoo! Groups Links
|
- RE: [flexcoders] Re: saving data from datagrid Matt Chotin
- RE: [flexcoders] Re: saving data from datagrid Doodi, Hari - BLS CTR

