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
Sent: Wednesday, May 04, 2005 6:26
AM
To: '[email protected]'
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
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf
Of Matt Chotin
Sent: Sunday, May 01, 2005 11:34
PM
To: [email protected]
Subject: RE: [flexcoders] Re:
saving data from datagrid
Have you checked the
RestaurantFinder tutorial on Christophe's blog (http://www.coenraets.com/)? I'd
start checking out your debugging options (described in our docs, search for
NetConnectionDebugger) to see if the data that you're sending back is actually
there.
Hi all,
If I confused you all with my earlier mail about
this issue, Sorry. What I
want to know is
If I passback the dataprovider of a datagrid to
java class thru RemoteObject
as joao_m_fernandes mentioned below
1) will java class
get the dataprovider as an array of valueobjects
OR
as an array of
objects so that I have to typecast to value objects?
When I use the following method signature in java
class I got length
displayed correctly but when I try to access
individual objects and
system.out.println displayed null on server
console.
public static String
saveSchedAdj(ItemAdjApplVO[] saveAdjVOArray) throws
SQLException.
Please advice or point me to an url...
If any one of us has already worked this out and
if you don't mind can you
post the code please. Thanks in advance..
Thanks!
Hari
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On
Behalf Of joao_m_fernandes
Sent: Thursday, April 28, 2005 11:57 AM
To: [email protected]
Subject: [flexcoders] Re: saving data from
datagrid
Hari,
You can send it back like this:
In AS:
ro.updateMethod(myDataGrid.dataProvider);
with MXML
<mx:RemoteObject id="ro" ...>
<mx:method name="updateMethod">
<mx:arguments>
<myArray>{myDataGrid.dataProvider}</myArray>
</mx:arguments>
</mx:method>
</mx:RemoteObject>
Jo�o Fernandes
--- In [email protected], "Doodi,
Hari - BLS CTR"
<[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have a updatable datagrid on my screen. I
did get data from the
> RemoteObject call from java backend (an array
of value objects).
Data got
> displayed on screen well and user can make
updates. Now my question
is how
> can I send this data from datagrid back to my
javaclass thru
RemoteObject
> call to save on to database. Please advice or
point me to some code
> examples. Thanks in advance..
>
> Thanks!
> Hari
Yahoo! Groups Links
Yahoo! Groups Links