I have been following some web examples online about creating a CRUD
application in Flex and LCDS (via CF8) that uses the DataGrid to modify and
update a Database.  As long as I have data in the database first, the read,
modify/update and delete functionality works.   But I want to be able to
Create a new record in the database and the instruction (from the web
example) was:

 

-------------------------------

Adding and removing items to the database is as trivial as adding a new item
to the ArrayCollection.

 

ArrayCollection.addItem(new className());

-------------------------------

 

That got me lost.  I understand the class stuff a little and understand the
structure of the class, but I can't seem to be able to figure out how to
create the correct function that will add records to the database from the
editable grid or from a form.  I have done some research on the
<datagrid.addItem> command, and tried it and it will add new information to
the datagrid from the form, but when I attempt to update the database with
the <DataServiceID.commit() command I get the following error:

 

RPC Fault faultString="Error during create: The BEAN argument passed to the
create function is not of type webexample.cfcs.contacts." faultCode="null"
faultDetail="null"]

                at
mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dis
patchFaultEvent()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\
data\ConcreteDataService.as:2087]

                at
mx.data::CommitResponder/sendCommitEvent()[C:\depot\flex\branches\enterprise
_bridgeman\frameworks\mx\data\CommitResponder.as:690]

                at
mx.data::CommitResponder/sendEvents()[C:\depot\flex\branches\enterprise_brid
geman\frameworks\mx\data\CommitResponder.as:675]

                at
mx.data::CommitResponder/dispatchFaultEvents()[C:\depot\flex\branches\enterp
rise_bridgeman\frameworks\mx\data\CommitResponder.as:505]

                at
mx.data::CommitResponder/result()[C:\depot\flex\branches\enterprise_bridgema
n\frameworks\mx\data\CommitResponder.as:417]

                at
mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\
mx\rpc\AsyncRequest.as:74]

                at
NetConnectionMessageResponder/resultHandler()[E:\dev\3.0.x\frameworks\projec
ts\rpc\src\mx\messaging\channels\NetConnectionChannel.as:469]

                at
mx.messaging::MessageResponder/result()[E:\dev\3.0.x\frameworks\projects\rpc
\src\mx\messaging\MessageResponder.as:199]

 

My question are:

 

1)      What is the above error about?

2)       How do I add a new record to my Flex/CF database via the editable
dataGrid?

3)      How do I add a new record to my Flex/CF database via a form?

 

Thanks in advance.

 

Andrej770




-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to