I am using Jdeveloper 11.1.2. I am a beginner. I had tried in-built createInsert and commit method to add new row into oracle DB. For that, I had created ViewObject, VOImpl and AMImpl. Then, I created to jsf page. On first page, I dragged and dropped createInsert fn and VO(as ADF-readonly table) from DC Palette. and on second page, I dragged and dropped my VO(as ADF-Form) and commit (as Button) from DC palette. I created task-flow for it. when i click on createInsert button, i redirected to second page. where i filled all the required information on form. After filling, when i clicked commit button, i redirected to first page.(coz i created task flow to return first page after commit). New row is inserted into ADF-table, but when i checked my oracle DB, there was nothing added.
Thus, I want to use custom method to insert row into OracleDB. So how can i get this? what are the steps required to do this? what programming codes required in Bean.java and AMImpl.java. Or is there any other steps to do this?
please provide me detail steps and programming code for bean, amimpl or for VOImpl or EOImpl.
please help me.
To insert a row into the db you have to use a VO which is based on an EO (entity object). There is no java class (or impl) needed. You can all do this decoratively.
All you have to think of is the PK of the new row. You can use Groovy for that (http://tompeez.wordpress.com/2011/09/02/using-groovy-expression-to-set-a-primary-key-with-a-sequence-number/)
The rest is like you described it yourself. Drag the Vo onto the page, drop it as read only table, drag the createInsert onto the page as button and set up the navigation. On the second page drag the same VO onto the page and drop it as ADF Form. drag the commit operation onto the page as button and setup the navigation back to the first page.
Thank you sir 4 ur kind information,
It helped me.
But, if I want to add any custom method then how can I achieve this?
I have also seen doDML fn in EOImpl. Can I use that fn to do this? If yes, what the programming code should I use?
And what should be in AM or Impl?
please, provide your kind help!!!
Well, I don't know what you try to do, so it'S hard to advice. From my experience I can tell you to do it declarative if possible.
If you must use a java method you should give more information why you want to do what.
actually, i m beginner(also student) and developing a project for my academic year.
so i want to just clear my basic concept. what is the relation between bean(java class in ViewController), AM,VO,EO?
And how AM is related with VO and EO?
I m not getting proper link from where I can get all my doubts cleared.
could you please provide me links for such concepts?
it will be very helpful 4 me.
Edited by: 987441 on Feb 12, 2013 7:57 AM
The official docs http://docs.oracle.com/cd/E35521_01/web.111230/e16182/toc.htm are cofering this into every detail. There are some very good commercial books out there with even more detail (this page list them http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html).