Abstract
OAF Personalization means personalize the user interface (UI) of Oracle Self-Service Web Applications without modifying any underlying code whereas OA Framework extensibility is geared to enable customers to add new functionality and override or extend existing business logic beyond what can be accomplished via personalization. In short it the programmatic approach for personalization.
In this article I will explain a case study for OAF Personalization and Extension by analyzing real time requirement and how we have to use OAF Personalization and OAF Extension tomeet the requirement.
Business Requirement
A customer defined DFF which is defined on the standard Oracle table needs to be enabled in the Self Service Web Screens.
There are five segments in the DFF. All the segments need to shown in the screens. Out of 5 segments, 4 are mandatory. However there is an exception to this rule. On certain circumstances (based on a lookup value) these segments are made non mandatory and defaulted with a value.
Analysis
On analysis, I found that the attribute columns on the standard Oracle table on which the DFF is defined was not included in the VO(View Object) on which the Self Service Page is built.
Also, we need to extend the CO (controller) of the page in order to handle the “mandatory” and “defaulting” with the DFF segments.
Design
This requirement can be easily achieved by following steps:
VO Substitution: Add additional columns to the VO.
OAF Personalization: Add the DFF field in the Web Screens using OAF Personalization Framework.
CO Extension: Handle the mandatory and defaulting values of segments based on the Lookup Value.
Implementation:
Step 1: VO Substitution
Actual VO: oracle.apps.pos.asn.server.PosAsnHdrIntfVO
SELECT PosRcvHdrIntfEO.HEADER_INTERFACE_ID,
PosRcvHdrIntfEO.GROUP_ID,
PosRcvHdrIntfEO.PROCESSING_STATUS_CODE,
PosRcvHdrIntfEO.PROCESSING_REQUEST_ID,
PosRcvHdrIntfEO.RECEIPT_SOURCE_CODE,
PosRcvHdrIntfEO.TRANSACTION_TYPE,
PosRcvHdrIntfEO.SHIP_TO_ORGANIZATION_ID,
PosRcvHdrIntfEO.VENDOR_ID,
PosRcvHdrIntfEO.VENDOR_SITE_ID,
PosRcvHdrIntfEO.SHIPPED_DATE,
PosRcvHdrIntfEO.ASN_TYPE,
PosRcvHdrIntfEO.SHIPMENT_NUM,
PosRcvHdrIntfEO.EXPECTED_RECEIPT_DATE,
PosRcvHdrIntfEO.PACKING_SLIP,
PosRcvHdrIntfEO.WAYBILL_AIRBILL_NUM,
PosRcvHdrIntfEO.BILL_OF_LADING,
PosRcvHdrIntfEO.FREIGHT_CARRIER_CODE,
PosRcvHdrIntfEO.FREIGHT_TERMS,
PosRcvHdrIntfEO.NUM_OF_CONTAINERS,
PosRcvHdrIntfEO.COMMENTS,
PosRcvHdrIntfEO.CARRIER_METHOD,
PosRcvHdrIntfEO.CARRIER_EQUIPMENT,
PosRcvHdrIntfEO.PACKAGING_CODE,
PosRcvHdrIntfEO.SPECIAL_HANDLING_CODE,
PosRcvHdrIntfEO.INVOICE_NUM,
PosRcvHdrIntfEO.INVOICE_DATE,
PosRcvHdrIntfEO.TOTAL_INVOICE_AMOUNT,
PosRcvHdrIntfEO.FREIGHT_AMOUNT,
PosRcvHdrIntfEO.TAX_NAME,
PosRcvHdrIntfEO.TAX_AMOUNT,
PosRcvHdrIntfEO.CURRENCY_CODE,
PosRcvHdrIntfEO.PAYMENT_TERMS_ID,
PosRcvHdrIntfEO.PAYMENT_TERMS_NAME,
PosRcvHdrIntfEO.VALIDATION_FLAG,
PosRcvHdrIntfEO.TAR_WEIGHT,
PosRcvHdrIntfEO.TAR_WEIGHT_UOM_CODE,
PosRcvHdrIntfEO.NET_WEIGHT,
PosRcvHdrIntfEO.NET_WEIGHT_UOM_CODE,
PosRcvHdrIntfEO.REMIT_TO_SITE_ID,
NULL FREIGHT_TERMS_DESC
FROM RCV_HEADERS_INTERFACE PosRcvHdrIntfEO
Substituted VO: xxx.oracle.apps.pos.asn.server. XXPosAsnHdrIntfVO
(Added the attribute columns to the query)
SELECT PosRcvHdrIntfEO.HEADER_INTERFACE_ID,
PosRcvHdrIntfEO.GROUP_ID,
PosRcvHdrIntfEO.PROCESSING_STATUS_CODE,
PosRcvHdrIntfEO.PROCESSING_REQUEST_ID,
PosRcvHdrIntfEO.RECEIPT_SOURCE_CODE,
PosRcvHdrIntfEO.TRANSACTION_TYPE,
PosRcvHdrIntfEO.SHIP_TO_ORGANIZATION_ID,
PosRcvHdrIntfEO.VENDOR_ID,
PosRcvHdrIntfEO.VENDOR_SITE_ID,
PosRcvHdrIntfEO.SHIPPED_DATE,
PosRcvHdrIntfEO.ASN_TYPE,
PosRcvHdrIntfEO.SHIPMENT_NUM,
PosRcvHdrIntfEO.EXPECTED_RECEIPT_DATE,
PosRcvHdrIntfEO.PACKING_SLIP,
PosRcvHdrIntfEO.WAYBILL_AIRBILL_NUM,
PosRcvHdrIntfEO.BILL_OF_LADING,
PosRcvHdrIntfEO.FREIGHT_CARRIER_CODE,
PosRcvHdrIntfEO.FREIGHT_TERMS,
PosRcvHdrIntfEO.NUM_OF_CONTAINERS,
PosRcvHdrIntfEO.COMMENTS,
PosRcvHdrIntfEO.CARRIER_METHOD,
PosRcvHdrIntfEO.CARRIER_EQUIPMENT,
PosRcvHdrIntfEO.PACKAGING_CODE,
PosRcvHdrIntfEO.SPECIAL_HANDLING_CODE,
PosRcvHdrIntfEO.INVOICE_NUM,
PosRcvHdrIntfEO.INVOICE_DATE,
PosRcvHdrIntfEO.TOTAL_INVOICE_AMOUNT,
PosRcvHdrIntfEO.FREIGHT_AMOUNT,
PosRcvHdrIntfEO.TAX_NAME,
PosRcvHdrIntfEO.TAX_AMOUNT,
PosRcvHdrIntfEO.CURRENCY_CODE,
PosRcvHdrIntfEO.PAYMENT_TERMS_ID,
PosRcvHdrIntfEO.PAYMENT_TERMS_NAME,
PosRcvHdrIntfEO.VALIDATION_FLAG,
PosRcvHdrIntfEO.TAR_WEIGHT,
PosRcvHdrIntfEO.TAR_WEIGHT_UOM_CODE,
PosRcvHdrIntfEO.NET_WEIGHT,
PosRcvHdrIntfEO.NET_WEIGHT_UOM_CODE,
PosRcvHdrIntfEO.REMIT_TO_SITE_ID,
NULL FREIGHT_TERMS_DESC,
PosRcvHdrIntfEO.ATTRIBUTE_CATEGORY,
PosRcvHdrIntfEO.ATTRIBUTE1,
PosRcvHdrIntfEO.ATTRIBUTE2,
PosRcvHdrIntfEO.ATTRIBUTE3,
PosRcvHdrIntfEO.ATTRIBUTE4,
PosRcvHdrIntfEO.ATTRIBUTE5,
PosRcvHdrIntfEO.ATTRIBUTE6,
PosRcvHdrIntfEO.ATTRIBUTE7,
PosRcvHdrIntfEO.ATTRIBUTE8,
PosRcvHdrIntfEO.ATTRIBUTE9,
PosRcvHdrIntfEO.ATTRIBUTE10,
PosRcvHdrIntfEO.ATTRIBUTE11,
PosRcvHdrIntfEO.ATTRIBUTE12,
PosRcvHdrIntfEO.ATTRIBUTE13,
PosRcvHdrIntfEO.ATTRIBUTE14,
PosRcvHdrIntfEO.ATTRIBUTE15
FROM RCV_HEADERS_INTERFACE PosRcvHdrIntfEO
Now this substitution information can be downloaded into an xml file which may look like:
Step 2: OAF Personalization
Now we need to add a new item to the Web Screens using the personalization link which is explained in the screen shot below:
After doing this we can download this personalization information into a XML file which will look like
In order to take this VO Substitution and OAF Personalization to other environments, we can use the ‘XMLImporter’ Utility provided by Oracle.
Step 3: CO Extension
In the extended controller we have to get the handle to the DFF and then make the individual segments mandatory or default the values based on the boolean flag ‘mandatory’.
public class XXPosAsnCreateCO extends PosAsnCreateCO
{
public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
//Get Handle to DFF
OADescriptiveFlexBean dffBean = (OADescriptiveFlexBean)webBean.findIndexedChildRecursive("DescFF");
dffBean.processFlex(pageContext);
//Make the segments mandatory
if(mandatory)
{
OAMessageLovInputBean segment2 = (OAMessageLovInputBean)dffBean.findChildRecursive("DescFF1");
if(segment2 != null)
{
segment2.setRequired("yes");
}
....
}
//Default the segment with the values from lookup
else
{
OAMessageLovInputBean segment2 = (OAMessageLovInputBean)dffBean.findChildRecursive("DescFF1");
if(segment2 != null)
{
segment2.setText(pageContext,attr2);
}
...
super.processRequest(pageContext, webBean);
}
This Java file needs to be deployed into the custom directory of the Oracle Apps instance ($XXX_TOP for example)
Screen shots:
Fig 1: Standard Oracle Apps Screen (No DFF)
Fig 2: Standard Oracle Apps Screen after OAF Personalization
(Segments are mandatory)
Fig 3: Standard Oracle Apps Screen after OAF Personalization
(Segments defaulted with values)
Hope this article was helpful in understanding the OAF Personalization and Extension.
For OAF customizations/extensions please contact This email address is being protected from spambots. You need JavaScript enabled to view it.
Comments
Excel lent article. Appreciate your efforts on documenting it so beautifully.
M y concern is if we implement such customization, then how to preserve them during an upgrade (say from 11.5.10 to R12.1)
Please advise.
Regard s
Shri
I have a business requirement where I need to make attachment as required on iSupplier Portal while creating the standard invoice. I am strugging on that. Please help. My contact number is +919818627707.
Thanks & Regards,
Rachna
This can be done, here is how
a. Extend the controller on that page
b. In this extended controller, create a VO dynamically to check if attachment exists against the invoice using an SQL similar to below
select 'x' from fnd_attached_do cuments where ENTITY_NAME ='INVOICE_OR_WH ATEVER' and pk1_value='invo ice_id_here'
Se e this link and copy paste
apps2fusion.com/apps/oa-framework/353-controller-extension-sql-pl-sql
3. Personalize the attachment region to ensure Auto-Commit is True
See my attachment articles if need be
This will ensure that data is available in fnd_attached_do cuments as soon as user enters the attachment
4. Throw an error message exception when dynamic VO of step 2 does not return any record
Thanks,
Anil Passi
OAF Personalization s are upgrade safe. However Controller extension depends on your logic. Refer to Anil's article in the following link
http://www.google.com/search?q=site:apps2fusion.com+controller-extension-in-oa-framework-is-safe-or-unsafe-2
Thanks and Regards,
Senthi l
With regards,
Kali.
A very good document and it really helped me a lot....Thanks a lot..
I need your help in a similar kind of requirement.I need to customize one seeded page which is the Bank Account page in AR.This page has one descriptive flex field
and this field has two segments as follows:
segmen t number -10,20
segment name - MName , MDesc
The Flexfield ID in the page is - "FlexField".So my question is how do I access the segments from the controller since I will have to default the "MDesc" field to "US Bank Account" while opening the Bank Account Page.
Please help me......
Thank s
Subhabrata Dasgupta
The following code snippet might help you:
OADescriptiveFl exBean dffBean =
(OADescriptiveFl exBean)webBean.findChildRecursive("HzAddressStyleF lex");
dffBean.process Flex(pageContex t);
OAMessageTextIn putBean addr1 = (OAMessageTextIn putBean)webBean.findChildRecursive("HzAddressStyleF lex1");
addr1.setText(" Enter Address");
Her e HzAddressStyleF lex is the Flex ID and HzAddressStyleF lex1 is the first segment
Hope this helps.
Thanks and Regards,
Senthi l
Thanks a lot for your quick response.
It resolved my issue but I have an another requirement.The Descriptive Flexfield has 2 context values ABC and XYZ . Now if I select ABC in the context value then only the corresponding segments should default otherwise the segment will not default.
How can I achieve this functionality please let me know.
I know Programmatic PPR can handle this but on which item I should put this PPR and how..Please help me in this.....
The event FLEX_FORM_EVENT for any changed in the Flex Field.
String formEvent = pageContext.get Parameter(FLEX_ FORM_EVENT);
g et this event and try to do the manipulation in your controller code.
Hope this helps.
Thanks and Regards,
Senthi l
We have extened one VO objects which was working fine.Now after apply the the standard patch, Standard VO defination is changed(Now it has different set of attribute) as the result of that the extented VO also start throwing error.
Is there any why to synchronize the extented VO with the upgraded VO.
Regard s,
Senthil
Can you please brief your requirement?
T hanks and Regards,
Senthi l
I've a read only Flex Field Segments displayed. I want to display the segments conditionally but I'm not able to geta handle of the segments based on the logic:
OADescr iptiveFlexBean dffBean =
(OADescriptive FlexBean)webBea n.findChildRecu rsive("HzAddres sStyleFlex");
dffBean.proces sFlex(pageConte xt);
OAMessageTextI nputBean addr1 = (OAMessageTextI nputBean)webBea n.findChildRecu rsive("HzAddres sStyleFlex1");
addr1.setText( "Enter Address");
When I try this:
OADescrip tiveFlexBean dffBean =
(OADescriptive FlexBean)webBea n.findChildRecu rsive("PerAsgDF F");
dffBean.proces sFlex(pageConte xt);
OAMessageTextI nputBean addr1 = (OAMessageTextI nputBean)webBea n.findChildRecu rsive("PerAsgDF F1");
if (addr1 != null)
addr1.set Rendered(false) ;
else
logic here..
It always goes to the else part.
I've also tried using MessageStyledTe xtBean to get the segment handle since this is read only. But it does not get a handle of the segment. Any help here is appreciated.
T hanks.
Is the segment text field or LOV? Did you try using the superclass OAWebbean? Also pls post your errors if you get any
Cheers,
Se nthil
I am personalizing sourcing application
i did my controller custom under the same package of standard ones, to test it.
i am getting a nullpointerexce ption in the standard class, and i am not underestading why
java.lang. NullPointerExce ption at oracle.apps.pon .tools.supplier search.webui.Su pplierSearchCO. setupCheckboxes (SupplierSearch CO.java:126) at oracle.apps.pon .tools.supplier search.webui.Su pplierSearchCO. processRequest( SupplierSearchC O.java:240)
thanks
As per oracle standards, you should not keep you extended file in the same package as that of std oracle file. You should place in a custom directory starting with 'xxx' or any custom name ...also the extended file should be something like XXSupplierSearc hCO.java ...
Please follow the standards and then post your errors if you get any.
Hope this helps.
Cheers,
Senthil
package oracle.apps.xx. tools.suppliers earch.webui;
O k?
package xxx.oracle.apps .pon.tools.supp liersearch.webu i;
Thanks and Regards,
Senthi l
Thanks .
import oracle.apps.pon .tools.supplier search.webui.Su pplierSearchCO;
thanks
public void processFormRequ est(OAPageConte xt oapagecontext, OAWebBean oawebbean)
{
super.processFo rmRequest(oapag econtext, oawebbean);
String where_clause = null;
String where_clause_c = null;
if(oapagecontex t.getParameter( "SearchButton") != null)
{
SupplierSearchV OImpl suppliersearchv oimpl = (SupplierSearchV OImpl)oapagecontext.getApplicationModule(oawebbean).findViewObject("SupplierSearchVO");
suppliersearchv oimpl.setupQuery(oapagecontext, oawebbean);
//suppliersearchv oimpl.executeQuery();
where_clause = suppliersearchv oimpl.getWhereClause();
try
{
/*
OAViewObject oaviewobject = (OAViewObject)o apagecontext.ge tApplicationMod ule(oawebbean). findViewObject( "AuctionHeaders AllVO");
AuctionHeadersA llVORow auctionheadersa llvorow = (AuctionHeadersA llVORow)oaviewobject.first();
auctionheadersa llvorow.getAuctionHeaderId();
*/
where_clause_c = " and pv.vendor_name= 'A1 SA DE CV' ";
where_clause = where_clause+wh ere_clause_c;
suppliersearchv oimpl.setWhereClause(where_clause);
suppliersearchv oimpl.executeQuery();
}
catch(Exception exception1)
{
System.err.prin tln(exception1 + " getting vendor category select");
}
return;
}
thanks
at oracle.apps.pon .tools.supplier search.webui.Su pplierSearchCO. setupInventoryO rg(SupplierSear chCO.java:315)
at oracle.apps.pon .tools.supplier search.webui.Su pplierSearchCO. processRequest( SupplierSearchC O.java:914)
at xx.oracle.apps. xx.tools.suppli ersearch.webui. ACSupplierSearc hCO.processRequ est(ACSupplierS earchCO.java:40 )
same error
Can you please point me to Line 40 in ACSupplierSearc hCO.java?
Also , when you totally remove all the extension, is your standard page gives the same error.
Kindly clarify.
Thank s and Regards,
Senthi l
the problem that i am having now, is the view is not giving me the where clause
public void processFormRequ est(OAPageConte xt oapagecontext, OAWebBean oawebbean)
{
String where_clause = null;
String where_clause_c = " and pv.vendor_name = :1";
File archivoSalida = new File("//hom e//applvis10//a rchivo1.txt" 1;;
DataOutputStrea m dos = null;
SupplierSearchV OImpl suppliersearchv oimpl = (SupplierSearchV OImpl)oapagecontext.getApplicationModule(oawebbean).findViewObject("SupplierSearchVO");
suppliersearchv oimpl.setupQuery(oapagecontext, oawebbean);
where_clause = suppliersearchv oimpl.getWhereClause();
try
{
BufferedWriter bw = new BufferedWriter( new FileWriter(arch ivoSalida));
if(suppliersearchv oimpl != null)
bw.write("No Soy null "+ "
");
for (int x=0;x
Can you please explain what is your requirement and what is your approach to acheive the same?
Thanks and Regards,
Senthi l
For that reason I create a new controller, and i am trying to change the where clause.
The problem is that the query es dynamic, so at this moment I only could get the query in a whole, and not the where clause to change it.
Do you have an email to send you something?
Or
Which is the best way to change a dynamic query of a View Object?
Thanks
Do you have any other suggestion for getting the handle of the flex segment? Thanks.
i need ur mail id i have MSCA Customization. i need ur help
can i know the ur Email id .
Thanks
Bhaskar
You can contact me at adminappsmaestro.com.
Cheers,
Sent hil
Mobile Supply Chain Applications resp i need add one filed line_no and i want hide so_orderno
how to start this iam new to java and mobile application..
can u pls provide me sample code or steps to do
Thanks
akkireddy
Kindly have a look at my article http://apps2fusion.com/at/ss/293-extend-a-standard-oracle-mscamwa-page
Feel free to post your queries.
Thank s and Regards,
Senthi l
i've an requirement in iexpenses where i've put a condition...i'm able to show the error message..but this message needs
to be put as policy violation....
h ow to acheive that ? Any Thoughts ? .....i've put the customer condition by extending controller.
Th anks,
Ritesh
Can you please clearly explani what are you trying to say by the word ' policy violation'?
Th anks and Regards,
Senthi l
Actua lly in Iexpense if you voilate any company rules defined.....it pops up as an warning message on the screen and the same goes to manager into the notification along with iexpense report submission.
e. g while putting and iexpense for reimbursement of my DSL Bill....if if unchek the filed Original Receipt missing then a warning message pops up on the screen with the message taht you have voilated the policy...and still i procced with and submit my expense report. Once i submit the report notification goes to manager and in the notification there will be a warning message : This iexpense report contains policy violation.
The same thing i want to achive for customer validation i.e. once an iexpense for the same date range has been submitted by employee...mana ger should be able to notice.....as of now i've put the validation by extending the ButtonCo Controller...an d able show the message on the screen too...but how i can make it available to the manager in the notification... .? How do i show it as a policy violation ?
Thanks,
Rite sh
As per Oracle Standards, popups are not allowed in OAF pages ..although you can use Javascript to acheive the same.
Alternat ively you can use throw new OAException("er ror msg") on your controller so that it shows the error message on top of the page.
For email notification, you have the following 3 options:
1) Use native Java program in CO to send emails
2) Use of Workflow/Alrets
3) Use of PLSQL if you have any custom PLSQL code.
Hope this helps.
Thanks and Regards,
Senthi l
I'm already done till throwing exception on the sceen...but i want to show it as a policy violation....tr ying different stuff... Seperate notification is not acceptable by business....it should be withing the iexpense apprvoal notification like its for the policy violation case
Regards,
Rite sh
Thank you for making a wonderful article.
Just a short question, are VO substitutions always working? I extended a built-in VO, modified its query to include 3 columns, made sure that the 3 columns are mapped to 3 new attributes, and also made sure that the query is still the same (just with new columns).
I deployed the custom VO and the substitution file and made a bounce.
I also confirmed that the custom VO is being referenced through jdr_utils.print document('...') .
However, when I try to access the page, I am greeted with the following exception, even without modifying anything in the personalization of the page.
Did I miss anything?
oracle.apps.fnd .framework.OAEx ception: java.lang.NullP ointerException
at oracle.apps.fnd .framework.OAEx ception.wrapper Exception(OAExc eption.java:896 )
at oracle.apps.fnd .framework.webu i.OAPageErrorHa ndler.prepareEx ception(OAPageE rrorHandler.jav a:1169)
at oracle.apps.fnd .framework.webu i.OAPageErrorHa ndler.processEr rors(OAPageErro rHandler.java:1 435)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr ocessRequest(OA PageBean.java:2 542)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr eparePage(OAPag eBean.java:1892 )
at oracle.apps.fnd .framework.webu i.OAPageBean.pr eparePage(OAPag eBean.java:536)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:424)
.
.
.
.
java.lang.NullP ointerException
at oracle.apps.fnd .framework.webu i.OAAdvancedTab leHelper.update InnerTablePrope rties(OAAdvance dTableHelper.ja va:1888)
at oracle.apps.fnd .framework.webu i.OAAdvancedTab leHelper.proces sRequestAfterCo ntroller(OAAdva ncedTableHelper .java:631)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processReque st(OAWebBeanHel per.java:654)
a t oracle.apps.fnd .framework.webu i.OAWebBeanTabl eHelper.process Request(OAWebBe anTableHelper.j ava:2141)
at oracle.apps.fnd .framework.webu i.OAAdvancedTab leHelper.proces sRequest(OAAdva ncedTableHelper .java:581)
at oracle.apps.fnd .framework.webu i.beans.table.O AAdvancedTableB ean.processRequ est(OAAdvancedT ableBean.java:7 37)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processReque stChildren(OAWe bBeanHelper.jav a:964)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processReque stChildren(OAWe bBeanHelper.jav a:931)
at oracle.apps.fnd .framework.webu i.OAWebBeanHelp er.processReque st(OAWebBeanHel per.java:655)
.
.
.
.
Thanks and Regards,
Donard
VO substitutions work always. You might be missing something. Check the steps again and let me know if you need any help.
Thanks and Regards,
Senthi l
I have a requirrment to display a new structure in the Special Information Types (SIT) screen in SSHR. The data entered into the segment needs to be validated using PL/SQL function.
I have performed below steps to display the structure/field on SIT Page
1. Created new flexfield structure as XX_LEAVE_ENCASH MENT under the "HUMAN RESOURCE" Application (Application id- 800) and flexfield TITLE "Personal Analysis Flexfield" (PEA).
2. Added a new segment "Encash Days" for the newly created flexfiled structure "XX_LEAVE_ENCASH MENT".
3. Added this new structure in the Special Information Types form in HRMS responsibility
4. The structure is enabled on the SIT screen.
Now I want to validate the data entered in Encash Days field in this page by calling a PL/SQL function. This can be done by extending the SIT page Controller.
But how should the ID of the newly enabled segment (in the new Flexfield strucuture) be retrieved in the controller inorder to read the user-entered value (to further call the validation program)? Or is there any other way of achieving this functionality in OAF?
Please help.
If you see the code snippet in the above article,
(Cut pasting for your easy ref)
//Get Handle to DFF
OADescriptiveF lexBean dffBean = (OADescriptiveFlexBean)webBean.findIndexedChildRecursive("DescFF");
OAMessageLovIn putBean segment2 = (OAMessageLovInputBean)dffBean.findChildRecursive("DescFF1");
segment2.setReq uired("yes");
DescFF is name of DFF
DescFF0 is segement1
DescF F1 is segment2 and so on ..
Hope this helps.
Thanks and Regards,
Senthi l
Please help me in setting values to individual segments of a KFF(standard one on standard page) programmaticall y on OAF Page...
I used the below code.. but unable to achieve...
OAK eyFlexBean kffbean= (OAKeyFlexBean) oawebbean.findI ndexedChildRecu rsive("CostAllo cationKeyflexId Val");
try{
Key Flexfield kff=(KeyFlexfie ld)kffbean.getA ttributeValue(O AWebBeanConstan ts.FLEXFIELD_RE FERENCE);
kff.g etSegment(1).se tDisplay();/set Value();
}
catc h(Exception e)
{
e.printSta ckTrace();
}
Pl ease help me on this...
Regard s,
Sunil.
If you look at the above article, I have got the handle to individual segments as highlighted below.
/Get Handle to DFF (Main FF)
OADescriptiveF lexBean dffBean = (OADescriptiveFlexBean)webBean.findIndexedChildRecursive("DescFF");
dffBean.proce ssFlex(pageCont ext);
// Get handle to individual segments
OAMessageLovInp utBean segment2 = (OAMessageLovInp utBean)dffBean.findChildRecursive("DescFF1");
segment2.setReq uired("yes");
Hope this helps.
Thanks and Regards,
Senthi l
Can you tell me how do I, as a functional person, change the layout of the iRec external candidate page. The client wants to change the colour, pictires and words and logo on it. They want it today, can you help
Regards,
Ajay
I have a requirement of hiding a region (NotifExpHistor yRN) in expense workflow notification based on one attribute value from pl/sql package. Can anybody tel me how to achieve this.
I have modified the controller as shown below. But its throwing NULL pointer exception.
NotifBodyRN - parent region
package wmmgd.oracle.apps.ap.oie.workflow.apexp.webui;
import java.sql.CallableStateme nt;
import oracle.apps.ap.oie.workflow.apexp.webui.NotifExpHistory CO;
import oracle.apps.ap.oie.workflow.apexp.utility.NotifConstants;
import oracle.apps.fnd.framework.OAApplicationMo dule;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.server.OADBTransaction Impl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBe an;
public class WMMAPNotifExpHi storyCOEx15 extends NotifExpHistory CO
implements NotifConstants {
public WMMAPNotifExpHi storyCOEx15() {
}
public void processRequest( OAPageContext paramOAPageCont ext, OAWebBean paramOAWebBean)
{
super.processRequest(paramOAPageCont ext, paramOAWebBean) ;
paramOAPageCont ext.writeDiagno stics(this, "Checking if it is OWG Responsibility" , 1);
OAApplicationMo dule oaapplicationmo dule = paramOAPageContext.getApplicationModule(paramOAWebBean) ;
ExpenseResponCheck(paramOAPageCont ext,paramOAWebBean,oaapplicationmo dule);
}
protected void ExpenseResponCh eck(OAPageConte xt oapageContext, OAWebBean oawebBean,OAApplicationMo dule oaapplicationmo dule)
{
oapageContext.w riteDiagnostics (this, "Workflow Notification change for OWG Users", 1);
//OAAdvancedTab leBean oaadvancedtable bean = (OAAdvancedTabl eBean)oawebBean .findIndexedChi ldRecursive("Ex pensesHistoryTb l");
OADBTransaction Impl trxn1 = (OADBTransaction Impl)oaapplicationmo dule.getOADBTransaction();
String exp_header_id = oapageContext.g etParameter("Re portHeaderId");
String OWG_RESP_CHECK = null;
String InsertStmt = null;
try
{
oapageContext.w riteDiagnostics (this, "Expense Report Header Id before: "+exp_header_id ,1);
if (exp_header_id != null)
{
oapageContext.w riteDiagnostics (this, "Expense Report Header Id: "+exp_header_id ,1);
oapageContext.w riteDiagnostics (this, "Checking if it is OWG Responsibility" , 1);
InsertStmt = "BEGIN wmm_ap_iexpense _wfnotif_pkg.wm m_isou_exists(: 1,:2); END; ";
CallableStateme nt insproc = trxn1.createCallableStateme nt(InsertStmt, 0);
insproc.setStri ng(1, (exp_header_id) );
insproc.registe rOutParameter(2 , java.sql.Types. VARCHAR);
insproc.execute ();
OWG_RESP_CHECK = (insproc.getStr ing(2));
oapageContext.w riteDiagnostics (this, "Is this OWG Responsibility "+OWG_RESP_CHEC K, 1);
insproc.close() ;
//OAMessageComp onentLayoutBean wmmActionHistor y = (OAMessageCompo nentLayoutBean) oawebBean.findC hildRecursive(" NotifExpHistory RN");
OAStackLayoutBe an wmmParentRn = (OAStackLayoutBe an) oawebBean.findC hildRecursive(" NotifBodyRN");
oapageContext.w riteDiagnostics (this, "Region ID value "+wmmParentRn, 1);
// oapageContext.w riteDiagnostics (this, "Table ID value "+oaadvancedtable bean, 1);
if ( wmmParentRn !=null)
{
OAStackLayoutBe an wmmChildRn = (OAStackLayoutBe an) wmmParentRn.fin dChildRecursive ("NotifExpHisto ryRN");
oapageContext.w riteDiagnostics (this, "Region ID value "+wmmParentRn, 1);
oapageContext.w riteDiagnostics (this, "Region ID2 value "+wmmChildRn, 1);
if (wmmChildRn !=null) {
wmmChildRn.setR endered(false);
}
}
}
}
catch(Exception e)
{
throw OAException.wra pperException(e );
}
}
}
I want to make the supplier Account number not accessible to the buyers at the time of supplier regsiteration for this i tried to make the filed Ready only /Disable it but its not working as the registration is not taking place with out account number. So i would like to know is there any possibliliy using OAF personalization i can default the time ,date and year of the supplier registration on the account number filed then later on Payables department will update the crct account details
please share ur thoughts on this....
thanks
santosh
RSS feed for comments to this post