Thanks Matt,

 

            I found where the problem is. I was following The Flex Book chapter 20 Flex integration with J2EE - where in the second parameter to Object.registerClass referred to constructor of ASObject class. This mislead me. When I specify the AS class name with qualifying path instead of constructor, everything started working fine. I don't know how to send this bug in the book to the authors. Can you send a comment to the authors on behalf of me??

 

Thanks!
Hari

-----Original Message-----
From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Monday, May 09, 2005 11:34 PM
To:
flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: saving data from datagrid

 

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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Doodi, Hari - BLS CTR
Sent: Monday, May 09, 2005 6:26 AM
To: '
flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Re: saving data from datagrid

 

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!
Hari

-----Original Message-----
From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Wednesday, May 04, 2005 10:33 PM
To:
flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: saving data from datagrid

 

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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Doodi, Hari - BLS CTR
Sent: Wednesday, May 04, 2005 6:26 AM
To: '
flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Re: saving data from datagrid

 

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
type : object

value[array] :

length[Number] : 5

[0][object] :

adj_amt_terms_desc[String] : 15.0 10 Days/Net 60 Days 8
adj_category[String] : Net Price Conversion Factor - Surcharge
adj_factor[String] : 1.2000
adj_month[null] : null
adj_num[Number] : 1
adj_order_applied[String] : 10
adj_reporter_applied_flag[String] : Y
adj_seas_flag[String] : N
adj_sign[String] : Additive
adj_status[String] : Y
adj_type[String] : Seasonal
irm[String] : 200404
item_sid[Number] : 1.16896E+006
row_change_flag[null] : null
update_date_time[null] : null

 

[1][object] :

adj_amt_terms_desc[String] : 15.0 10 Days/Net 60 Days Test 2
adj_category[String] : Net Price Conversion Factor - Discount
adj_factor[String] : .1000
adj_month[null] : null
adj_num[Number] : 2
adj_order_applied[String] : 1
adj_reporter_applied_flag[String] : Y
adj_seas_flag[String] : N
adj_sign[String] : Multiplicative
adj_status[String] : N
adj_type[String] : Seasonal
irm[String] : 200404
item_sid[Number] : 1.16896E+006
row_change_flag[null] : null
update_date_time[null] : null

 

[2][object] :

adj_amt_terms_desc[String] : 15.0 10 Days/Net 60 Days Changed
adj_category[String] : Discount
adj_factor[String] : .1000
adj_month[null] : null
adj_num[Number] : 3
adj_order_applied[String] : 10
adj_reporter_applied_flag[String] : Y
adj_seas_flag[String] : N
adj_sign[String] : Subtractive
adj_status[String] : Y
adj_type[String] : Seasonal
irm[String] : 200404
item_sid[Number] : 1.16896E+006
row_change_flag[null] : null
update_date_time[null] : null

 

[3][object] :

adj_amt_terms_desc[String] : Values New and Modified
adj_category[String] : Surcharge
adj_factor[String] : .3000
adj_month[null] : null
adj_num[Number] : 4
adj_order_applied[String] : 10
adj_reporter_applied_flag[String] : Y
adj_seas_flag[String] : N
adj_sign[String] : Multiplicative
adj_status[String] : Y
adj_type[String] : Seasonal
irm[String] : 200404
item_sid[Number] : 1.16896E+006
row_change_flag[null] : null
update_date_time[null] : null

 

[4][object] :

adj_amt_terms_desc[String] : Values/Term 200411
adj_category[String] : Unit Conversion Factor
adj_factor[String] : .3000
adj_month[null] : null
adj_num[Number] : 5
adj_order_applied[String] : 10
adj_reporter_applied_flag[String] : N
adj_seas_flag[String] : N
adj_sign[String] : Multiplicative
adj_status[String] : Y
adj_type[String] : Seasonal
irm[String] : 200404
item_sid[Number] : 1.16896E+006
row_change_flag[null] : null
update_date_time[null] : null

 

 

 

Thanks!
Hari

 




Yahoo! Groups Links

Reply via email to