Wednesday, November 2, 2011

Thread: JDeveloper 11g/ADF JPA/EJB form; Commit operation missing in Data Control?

Frank Nimphius

Posts: 24,751
Registered: 01/10/01
Re: JDeveloper 11g/ADF JPA/EJB form; Commit operation missing in Data Control?
Posted: Jan 25, 2011 9:04 AM in response to: KenBray in response to: KenBray
Helpful
Hi,

Commit and Rollback is not available for DataControls other than ADF Business Components as there is no native semantic of commit / rollback. Instead the EJB facade exposes a method ("persist" for commit and "merge" for update) that you call to persist changes. So in ADF, what you do

- drag the merge or persist method from the Data Control and drop it as a button
- A dialog opens for you to point it to the object you want to save
- Use Expression Builder (button next to the value field) and browse bindings --> Iterator name of form --> currentRow --> dataProvider

Next time you press the button, the current row is persisted

Frank

Ps.: For a future release we are working on a mapping method in a session facade that allows us to map the Commit/Rollback operations directly
Shay Shmeltzer

Posts: 12,819
Registered: 03/08/01
Re: JDeveloper 11g/ADF JPA/EJB form; Commit operation missing in Data Control?
Posted: Jan 25, 2011 9:28 AM in response to: KenBray in response to: KenBray
Helpful
Here is a video of how you can use the persist and merge methods:
http://blogs.oracle.com/shay/2009/01/insert_update_for_jpaejb_30_wi.html

No comments:

Post a Comment