| Home |
| Technical Articles |
| Training Articles |
| Receive Email for New Articles |
| Contributors |
| Hands-On-Training |
| Apps Book |
Technical Articles
Oracle Application Framework
OA Framework Tutorials 02
| OA Framework Tutorials 02 | | Print | |
| Written by Anil Passi | |
| Thursday, 28 June 2007 | |
|
In this tutorial, we will implement a "Delete record" functionality to the screen developed in previous tutorial. 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
(20)
written by amjad , June 28, 2007 written by amjad , June 28, 2007
Anil,
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
Thank you Very much Anil!!!
Your tutorials are very helpful........I am also eagerly for your next part... Pavan
Hi Anil,
I was going thru the tutorial#2 practical and found the error below: Error(55, : method InvokeMethod(java.lang.String, java.io.Serializable[]) not found in interface oracle.apps.fnd.framework.OAApplicationModule. This is while compiling the xxPersonMainCO.java. Am I missing anything here? Thanks Badri
Hi Anil,
you are amazing. That really resolve the issue. Now i am testing the delete record functionality and found the delete icon is not working. Meaning 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
Hi Anil,
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
Anil,
Excellent Job. Keep up the good work. Looking forward for some more tutorials on upcoming Fusion Applications.
Hi Anil,
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
Hi Anil,
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???
I think the problem was solved. the image is now displayed
hi Anil,
When do we use voimpl and when do we use vorowimpl? Please clarify?
Hi Anil,
I'm having trouble running it in R12 RUP2. A runtime exception is thrown see below: Exception Details. oracle.apps.fnd.framework.OAException: oracle.jbo.DMLException: JBO-26080: Error while selecting entity for TstPersonDetailsEO at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(Unknown Source) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source) at org.adb.oracle.apps.ak.person.webui.TstPersonMainCO.processFormRequest(TstPersonMainCO.java:50) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown 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
I commented out the getOADBTransaction().commit(); it would seem that it is the one causing the errors. it deleted the row but the server is waiting for the commit signal to continue.
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?
Ok, please disregard the last error. I was attempting to post a save on an R12 instance that was being bounced. Crazy but true, the admins didnt even sent a downtime notification.
Anyway getOADBTransaction().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 written by kishore Ryali , March 01, 2008
Hi Anil Passi
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.OAException: In APPLICATION_MODULE. Then I Edited the AM to expose the method "deletePersonMethod" to Client Methods and it worked fine. Do I have to expose the methods in AM to Client Methods, to use them in Controller? Thanks Kishore Ryali You must be logged in to a comment. Please register if you do not have an account yet.
|
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