Showing posts with label About Page in OAF. Show all posts
Showing posts with label About Page in OAF. Show all posts

Tuesday, 9 May 2017

View SQL Statement from OAF Page


Below are the detailed steps:
1) Update the following Profile Option Values to Yes at User level.

• FND: Diagnostics
• Personalize Self-Service Defn
 
2) Go to the Java OAF Page where the SQL Query executes
3) Click on the link About this Page in the bottom Left Hand Side of the page
4) Navigate to the Page Tab on the Top Left Hand Side of the page
5) In the Business Component References Details Section (You may need to expand this
section), Go to the View Objects Sub Section.
6) Find the Object that describes the piece of information that you want to find the query for
7) Click on the Link
8) The full Query used can be cut and pasted into a SQL Editor and the query run.

Note: You will have to find the Bind Variables passed to the query in order to do this!!


Wednesday, 24 June 2015

Update, Insert & Delete Records in OAF in oracle apps

Pre-Requisite
Do complete the following exercises

Step 1: Create Delete Icon for Delete Action
Select SearchPG.xml
Right click on SearchTable -> New -> Item


Update the Properties
Attribute
Property
ID
Delete
Item Style
image
Atribute Set
/oracle/apps/fnd/attributesets/Buttons/Delete
Prompt
Update
Image URI
deleteicon_enabled.gif
Additional Text
Delete record
Height
24
Width
24
Action Type
fireAction
Event
delete
Submit
TRUE
Parameters
Name
Value
PPersonType
${oa.SearchVO.PersonType}
PPersonName
${oa.SearchVO.PersonName}
PEmailAddresss
${oa.SearchVO.EmailAddresss}
PContactNumber
${oa.SearchVO.ContactNumber}
  

Step 2: Add the below code in SearchAMImpl.java
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
import oracle.jbo.Row;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.domain.Number;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
import oracle.jbo.RowSetIterator;
public void deleteRecord()
{
OAViewObject vo = getSearchVO();
SearchVORowImpl row = null;
int fetchedRowCount = vo.getFetchedRowCount();
RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
if (fetchedRowCount > 0)
{  deleteIter.setRangeStart(0); 
 deleteIter.setRangeSize(fetchedRowCount);
 for (int i = 0; i < fetchedRowCount; i++)
{
  row = (SearchVORowImpl)deleteIter.getRowAtRangeIndex(i);
  row.remove();
  getTransaction().commit();
  break;
}
}
deleteIter.closeRowSetIterator();
}
Step 3: Add the below code in SearchCO.java
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean;
import com.sun.java.util.collections.HashMap;
import oracle.apps.fnd.framework.webui.OADialogPage;
import oracle.apps.fnd.common.MessageToken;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.OAApplicationModule;
Add the below code in processFormRequest
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vo =(OAViewObject)am.findViewObject("SearchVO");
String rowRef =
pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
OARow row = (OARow)am.findRowByRef(rowRef);
if ("delete".equals(pageContext.getParameter(EVENT_PARAM)))
{
OAException message = new OAException("Are you sure you want to delete this row?",OAException.WARNING); 
pageContext.putDialogMessage(message);
OADialogPage dialogPage = new OADialogPage(OAException.WARNING, message, null, "", "");
String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
dialogPage.setOkButtonItemName("DeleteYesButton");
dialogPage.setOkButtonToPost(true);
dialogPage.setNoButtonToPost(true);
dialogPage.setPostToCallingPage(true);
dialogPage.setOkButtonLabel(yes);
dialogPage.setNoButtonLabel(no);
pageContext.redirectToDialogPage(dialogPage);
}
else if (pageContext.getParameter("DeleteYesButton") != null)
{
am.invokeMethod("deleteRecord", null);
OAException confirmation = new OAException("Record deleted Successfully", OAException.CONFIRMATION);
pageContext.putDialogMessage(confirmation);
}
Step 4: Save all your work and Run the SearchPG.xml

Step 5: Delete a Record

Wednesday, 1 April 2015

To show the About Page in OAF screen




About Page:
FND
FND: Diagnostics = Yes
FND: Personalization Region Link Enabled = YES
Personalize Self-Service Defn
Personalize Self-Service Defn = YES
Disable Self-Service Personal
Disable Self-Service Personal = NO (Only at Site)