<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content

Green

color

Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color
Home
This website has now moved to http://apps2fusion.com





OA Framework Tutorials 02 | Print |  E-mail
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)add
...
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.. smilies/smiley.gif

Best Regards
Amjad
...
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.. smilies/smiley.gif

Best Regards
Amjad
...
written by Pavan Ranga , July 08, 2007
Thank you Very much Anil!!!

Your tutorials are very helpful........I am also eagerly for your next part... smilies/smiley.gif

Pavan
...
written by BadriNath , August 04, 2007
Hi Anil,
I was going thru the tutorial#2 practical and found the error below:
Error(55,smilies/cool.gif: 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
...
written by Anil Passi , August 04, 2007
Hi Badri

Java is case sensitive.
Error message states you are calling InvokeMethod
Instead, you should be calling invokeMethod

Thanks,
Anil Passi

...
written by BadriNath , August 04, 2007
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
...
written by Anil Passi , August 04, 2007
Hi 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://apps2fusion.com

Thanks,
Anil Passi
...
written by Badri Nath , August 14, 2007
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
...
written by Anil Passi , August 19, 2007
Hi badri

Your invoke method parameters do not match with the Application Module method.

Do the below steps
1. Put break point in ProcessFormRequest 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 processFormRequest in debugger.
5. Click resume in debugger? You will find that execution hasn't really gone into ApplicationModule.

Thanks,
Anil
...
written by raghu , August 23, 2007
Anil,
Excellent Job. Keep up the good work. Looking forward for some more tutorials on upcoming Fusion Applications.
...
written by Raneem , September 12, 2007
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
...
written by Raneem , September 12, 2007
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???
...
written by Raneem , September 12, 2007
I think the problem was solved. the image is now displayed smilies/smiley.gif
...
written by shaan , September 17, 2007
hi Anil,
When do we use voimpl and when do we use vorowimpl?
Please clarify?
...
written by Anil Passi , September 17, 2007
Hi Shaan

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,
Anil Passi
Error running delete AM in R12
written by Ree Tanjuatco , December 07, 2007
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
Update
written by Ree Tanjuatco , December 07, 2007
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?

2nd Update.
written by Ree Tanjuatco , December 07, 2007
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
Expose deletePersonMethod to Client methods in xxPersonAM??
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

...
written by Anil Passi , March 01, 2008
Hi Kishore

Please paste the entire error stack.

Thanks,
Anil
You must be logged in to a comment. Please register if you do not have an account yet.

busy