Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

OA Framework - All Articles
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

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.

Anil Passi

Comments   

0 #1 amjad 2007-06-28 00:00
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
Quote
0 #2 amjad 2007-06-28 00:00
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
Quote
0 #3 Pavan Ranga 2007-07-08 05:11
Thank you Very much Anil!!!

Your tutorials are very helpful........ I am also eagerly for your next part... :)

Pavan
Quote
0 #4 BadriNath 2007-08-04 04:44
Hi Anil,
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
Quote
0 #5 Anil Passi 2007-08-04 13:26
Hi Badri

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

T hanks,
Anil Passi
Quote
0 #6 BadriNath 2007-08-04 16:02
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.
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
Quote
0 #7 Anil Passi 2007-08-04 17:10
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://www.apps2fusion.com/apps_tutorials/oa_framework/xxt.zip

Thanks,
Anil Passi
Quote
0 #8 Badri Nath 2007-08-14 19:50
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
Quote
0 #9 Anil Passi 2007-08-19 07:12
Hi 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
Quote
0 #10 raghu 2007-08-23 01:02
Anil,
Excellent Job. Keep up the good work. Looking forward for some more tutorials on upcoming Fusion Applications.
Quote
0 #11 Raneem 2007-09-12 09:13
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
Quote
0 #12 Raneem 2007-09-12 10:26
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???
Quote
0 #13 Raneem 2007-09-12 10:41
I think the problem was solved. the image is now displayed :)
Quote
0 #14 shaan 2007-09-17 09:30
hi Anil,
When do we use voimpl and when do we use vorowimpl?
Plea se clarify?
Quote
0 #15 Anil Passi 2007-09-17 11:17
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,
A nil Passi
Quote
0 #16 Ree Tanjuatco 2007-12-07 01:28
Hi Anil,

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
Quote
0 #17 Ree Tanjuatco 2007-12-07 01:39
I commented out the getOADBTransact ion().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?
Quote
0 #18 Ree Tanjuatco 2007-12-07 04:02
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 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
Quote
0 #19 kishore Ryali 2008-03-01 15:09
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.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
Quote
0 #20 Anil Passi 2008-03-01 15:30
Hi Kishore

Please paste the entire error stack.

Thanks,
Anil
Quote
0 #21 Satish Mavuri 2008-03-27 12:18
Hi

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
Quote
0 #22 elango 2009-10-03 04:23
Hi Anil,
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
Quote
0 #23 SEOGuarantee.com 2021-06-16 13:42
I like the valuable info you supply for your articles.
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!
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner