Wednesday, February 5, 2014

How to get the value of the field in OAF



How to get the value of the field in OAF

Now we are going to learn about how to get the value of a field in OAF.
Let us assume there is a messagetextinput field now we have to capture the value entered in that field.

Import the OAMessageTextInputBean

import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;

OAMessageTextInputBean msc = (OAMessageTextInputBean)webBean.findChildRecursive("EmployeeName");
 msc = msc.getValue(pageContext).toString();

Tuesday, February 4, 2014

How to change the file permissions programmetically in OAF

Changing file permissions programmetically


This is one of the rare situation we face in OAF. Consider that suppose you are moving the file from local machine to server through OAF using message file upload item. Now you need that while moving you want to change the file permissions.

To achive this write the below code after the file uploading code.

Set the file permission :
  1. file.setExecutable(boolean); – true, allow execute operations; false to disallow it.
  2. file.setReadable(boolean); – true, allow read operations; false to disallow it.
  3. file.setWritable(boolean); – true, allow write operations; false to disallow it.

If you not find these methods in your jDeveloper then use the below line of code.

Runtime.getRuntime().exec("chmod 777 /sw_stage/utldata/csdupdate/incoming/"+uFileName);


Monday, February 3, 2014

How to create External Lov in OAF



Creating External Lov in OAF

Now we are going to learn about how to create the external lov in oaf.


Step1:- Create a Workspace and Project.

Step2:- Create an Application Module.

Step3:- Create a page and attach the application module.

Step4:- Now create a new VO for lov.

             Name: - KPITextLovVO
             Package: - sangu.oracle.apps.pos.lov.server  (Its better practice to create all lov vo’s under   
                               lov.server)
             Click on Next in the query section give the query for lov.
             And click on generate the java files.

Step5:- Create one AM for lov
             Name:- LovAM
             Package:- sangu.oracle.apps.pos.lov.server 

Step6:- Create a new region
             Right click on project select new== > OAComponent == > Region.

             Name :- KPITextLovRN
             Package:- sangu.oracle.apps.pos.lov.webui

             And set the below properties.

             Scope :- public

             And attach the LovAM to this region.

Step7:- Right click on the region and select new== > table using wizard.
             Next select the LovAM under dropdown list and select the lov vo
             Click next.
             Select the column which u want for lov.
             And finish.

Step8:- Now come to the main page under that create one item with style message lov input.
             Set the below properties.

             ExternalLov:- sangu.oracle.apps.pos.lov.webui.KPITextLovRN

Note:- Give the lov region u have created along with path.
            Next Provide the lovmappings
LovRegionItem :- Name of the column
Return Item:- Id of the message lov input item.
Criteria Item :- Id of the message lov input item.

This finishes the external lov run the page to see the output.

Sunday, February 2, 2014

Import Commands in OAF

Import Commands in OAF


Import Command for page.


From unix server:

Run the below command from the path.

$JAVA_TOP/xx/oracle/apps/po/emp/webui

java oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/xx/oracle/apps/po/emp/webui/EmployeePG.xml -rootdir  $JAVA_TOP -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=focusthreadr12.com)(PORT=1521))(CONNECT_DATA=(SID= VISR12)))"

From command prompt:

C:\dev\oaf\r1211\jdevbin\oaext\bin

            import C:\dev\oaf\r1211\jdevhome\jdev\myprojects\xx\oracle\apps\po\emp\webui\EmployeePG.xml -rootdir C:\dev\oaf\r1211\jdevhome\jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=focusthreadr12.com)(PORT=1521))(CONNECT_DATA=(SID=visr12)))"




Import Command for VO Extension.

Run the below command from the below path from command prompt.


C:\oaf\p9879989_R12_GENERIC\jdevbin\oaext\bin

jpximport C:\oaf\p9879989_R12_GENERIC\jdevhome\jdev\myprojects\VOExtension.jpx -username apps -password apps –dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST= focusthreadr12.com)(PORT=1521))(CONNECT_DATA=(SID= visr12)))"