Anil's Blog is Best Viewed on GOOGLE CHROME

Friday, September 24, 2010

Popup in OAF - R12.1.2 Part II

If you have not gone through Popup first exercise then please go through to get brief intro about Popups.

Popup in OAF Part1

We can also UPDATE  through Popup region without navigation to update page.


The  region  popups when user click on update inline image.

We will be creating a new External Region EmpPopupRN for this popup. No need to give AM definition for this region. Add a submit button & beans in this region for which you want to update Set the VO attribute and VO name same as the VO of results table i.e. EmployeeSummaryVO.





Now in your Results table of Search Page Add a flowLayoutRN and under it create an item of style image and a region of style popup.



Now click on your popup region EmployeePopup and set its properties

Region             Path of above External Region EmpPopupRN
Title                 Update Employee
Height              190
Width               380





Now click on image Set the following properties.


PopupId                                  EmployeePopup
Popup Render Event             On Click
Popup enabled                        True

Now in our page as we will be having a save button so we need to handle this button and post the data when user clicks on it. So we will be writing our code in PFR of EmployeeResultsCO


if (pageContext.getParameter("Save") != null )
 {
 OAApplicationModule am = pageContext.getApplicationModule(webBean);
 am.invokeMethod("apply");
 }

//and this calls out Apply method in AM

public void apply()
{
 getTransaction().commit();

}

Now you can run your page and see that now you can update the fields without navigating to other page.

2 comments:

  1. Is it possible to open a popup similar to this from java script?

    I have embedded a html which uses js in an oaf page. I have a link in that html and when I click on that link I want to open a popup.

    Is it possible?

    ReplyDelete
  2. using above approach does pop-up gets closed after clicking on update and refresh base page?
    Can you give example how to use 12.1.3 popups to do this?

    ReplyDelete

Note: Only a member of this blog may post a comment.