If you recollect, in previous tutorial we created a screen, whereby users could search the records in a table named xx_person_details.
Before jumping onto the Audio-Video tutorial, lets first try to understand the concepts.
What are the steps in brief?
Step 1.Add an item that will display "Delete icon" for each record in the list. This item will be added to the search result region.
Step 2. Amend the properties of the "Delete item/icon" such that it does two things when it is clicked upon
A. It should raise an event(trigger) named deletePerson. This event named deletePerson can be trapped in processFormRequest of the Controller Class.
B. When "deletePerson Event" is fired, we must ensure that the personId of the record being deleted is passed to PFR[processFormRequest] in Controller.
Both A and B can be specified in the property of the Delete Item.
Step 3. Assign a Controller class to the page, so that we can trap deletePerson event in processFormRequest
Step 4. Inside processFormRequest [PFR], invoke a method in ApplicationModule, and pass it parameter named paramPersonId.
Lets say the name of ApplicationModule method being invoked is deletePersonMethod
Step 5. Write a method named deletePersonMethod inside the ApplicationModule. Remember to this method controller has passed the personId of the record being deleted.
Step 6. Inside deletePersonMethod, Loop through the records displayed in screen via ViewObject.
When inside the loop, keep comparing the fetched personId with the parameter paramPersonId.
When a match is found then remove record from ViewObject Rows and then commit and exit the loop.
Why are we deleting the record from viewObject row? Aren't we supposed to remove the record from Entity Object?
Removing the record from view object will remove it from Entity Object as well, hence deleting the record from database.
To recap, sequence of events will be
User clicks delete icon for a person record
personId and "action name"/"event name" is passed as parameter to CO [Note this CO is attached to xxPersonMainPG]
Inside CO, call a method in AM, passing it name of the action and personId
Inside AM, find and remove that record from ViewObject
Audio Video links for this OA Framework Tutorial are
1. Audio Video Link to add delete icon. This will also show you how to pass parameters when event is raised.
2. Audio Video to define the Controller from where AM method is invoked
3. Audio Video for writing code in ApplicationModule, to actually delete the record.
We will also we test the functionality in this video
Note:- In OA Framework, there are multiple ways of doing a set of tasks. One can also use "find by primary key" to search for the PersonId to be deleted.
Comments
Nice Audio and video of part-2
I m learning new things thru this tutorial in very short time.... Even I have gone OA Developers Guide.. I hvnot understood that much... but U made it very easy for me..
to explain oaf concept in better way..
Nice job Anil,
Very Much Thanks to you...
Waiting for next Part.. :)
Best Regards
Amjad
Nice Audio and video of part-2
I m learning new things thru this tutorial in very short time.... Even I have gone OA Developers Guide.. I hvnot understood that much... but U made it very easy for me..
to explain oaf concept in better way..
Nice job Anil,
Very Much Thanks to you...
Waiting for next Part.. :)
Best Regards
Amjad
Your tutorials are very helpful........ I am also eagerly for your next part... :)
Pavan
I was going thru the tutorial#2 practical and found the error below:
Error(55 ,8): method InvokeMethod(ja va.lang.String, java.io.Seriali zable[]) not found in interface oracle.apps.fnd .framework.OAAp plicationModule .
This is while compiling the xxPersonMainCO. java.
Am I missing anything here?
Thanks
Badri
Java is case sensitive.
Erro r message states you are calling InvokeMethod
Instead, you should be calling invokeMethod
T hanks,
Anil Passi
you are amazing. That really resolve the issue.
Now i am testing the delete record functionality and found the delete icon is not working.
Meanin g It is behaving like no functionality is attached to it. Though I have completed all the steps for this.
Could you please guide me where I am wrong?
Thanks
Badri
You need to set the Client Action property for that item.
Also, have you specified image url? to display image
The source code is available for download from
http://www.apps2fusion.com/apps_tutorials/oa_framework/xxt.zip
Thanks,
Anil Passi
Any idea How can i debug the issue below?
No method with signature - No method with signature - deletePerson?
This is coming while deleting the record.
Thanks
BADRI
Your invoke method parameters do not match with the Application Module method.
Do the below steps
1. Put break point in ProcessFormRequ est where deletePerson is called
2. Put break point in AM where you have defined delietePerson
3 . Run your page in debug mode
4. Execution will go to processFormRequ est in debugger.
5. Click resume in debugger? You will find that execution hasn't really gone into ApplicationModu le.
Thanks,
An il
Excellent Job. Keep up the good work. Looking forward for some more tutorials on upcoming Fusion Applications.
I am really amazed by this tutorial,
i was really confused with the OA but now with it my problems is solved.
really it is soooo helpful
thank you
i have a problem in displaying the delete image
it is not working, i don't know mzybe the problem is the path i put the pic in OA_HTML,
is it the right path??? or the problem might be something else???
When do we use voimpl and when do we use vorowimpl?
Plea se clarify?
Think of VOImpl as the Database View
and think of VORowImpl as a row fetched from Database view.
If you want to set where clause of a view, you would do that on database view itself, hence the usage of VOImpl
get* and set* methods in VORowImpl will be called for each row.
Thanks,
A nil Passi
I'm having trouble running it in R12 RUP2. A runtime exception is thrown see below:
Excepti on Details.
oracle.apps.fnd .framework.OAEx ception: oracle.jbo.DMLE xception: JBO-26080: Error while selecting entity for TstPersonDetail sEO
at oracle.apps.fnd .framework.OAEx ception.wrapper InvocationTarge tException(Unkn own Source)
at oracle.apps.fnd .framework.serv er.OAUtility.in vokeMethod(Unkn own Source)
at oracle.apps.fnd .framework.serv er.OAUtility.in vokeMethod(Unkn own Source)
at oracle.apps.fnd .framework.serv er.OAApplicatio nModuleImpl.inv okeMethod(Unkno wn Source)
at org.adb.oracle. apps.ak.person. webui.TstPerson MainCO.processF ormRequest(TstP ersonMainCO.jav a:50)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processFormR equest(Unknown Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanCont ainerHelper.pro cessFormRequest (Unknown Source)
at oracle.apps.fnd .framework.webu i.OAPageLayoutH elper.processFo rmRequest(Unkno wn Source)
at oracle.apps.fnd .framework.webu i.beans.layout. OAPageLayoutBea n.processFormRe quest(Unknown Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processFormR equestChildren( Unknown Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processFormR equestChildren( Unknown Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processFormR equest(Unknown Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanCont ainerHelper.pro cessFormRequest (Unknown Source)
at oracle.apps.fnd .framework.webu i.beans.form.OA FormBean.proces sFormRequest(Un known Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processFormR equestChildren( Unknown Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processFormR equestChildren( Unknown Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processFormR equest(Unknown Source)
at oracle.apps.fnd .framework.webu i.OAWebBeanCont ainerHelper.pro cessFormRequest (Unknown Source)
at oracle.apps.fnd .framework.webu i.beans.OABodyB ean.processForm Request(Unknown Source)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr ocessFormReques t(Unknown Source)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr eparePage(Unkno wn Source)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr eparePage(Unkno wn Source)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr eparePage(Unkno wn Source)
at _OA._jspService (_OA.java:72)
I tried everything from enabling the Client and Client Row Interface for the VO object and
the client interface for the AM object. I also made the EO object enable DML methods but that didnt work?
The rest of the exception read invalid character. Now I checked every code and I followed your example to the dot. What could have gotten wrong?
Thanks!
Ree
Error
The search cannot be executed because the table has pending changes that would be lost.
Is there any other way to commit the transaction in R12?
Anyway getOADBTransact ion().commit(); is still causing me errors. for some reason it wont execute the update. Commenting out the code, it will not raise the exception but will not commit the changes.
Is there any other way to make the delete?
Thanks ,
Ree
I could successfully complete the tutorial 1 and run in it from Apps Instance.
When tutorial 2 is completed and ran the page, I got
framework.OAEx ception: In APPLICATION_MOD ULE.
Then I Edited the AM to expose the method "deletePersonMe thod" to Client Methods and it worked fine.
Do I have to expose the methods in AM to Client Methods, to use them in Controller?
Th anks
Kishore Ryali
Please paste the entire error stack.
Thanks,
Anil
I am facing this error in AM . java. I checked the name of the method (case) in both CO and AM. but it gives me the error?
Did I miss something?
-Pr amod
This site is awesome and gaining lot of information. Thanks for sharing this.
I am having following error message
Error(4 2,32): incompatible types; found: oracle.apps.fnd .framework.serv er.OAViewObject Impl, required: ttec.oracle.app s.ak.paf.server .PafVOImpl, when i do the above exercise
Can you please help me?
Thanks
Elan go.P
I will bookmark yyour weblog and test again right here regularly.
I'm fairly sure I'll be informed plenty of new
stuff proper right here! Good luck for the following!
RSS feed for comments to this post