All the folks who work on OA Framework(OAF) would know that there is no
configuration option like we have in forms to make an OAF page
read-only. Its a very common requirement. I faced a similar situation where I had no option left but do research to find how we can make an OAF page read-only. After lot of research I found that in Release 12 Oracle Purchasing does render OAF pages in read-only mode. After decompiling hundreds of Oracle java classes I found the holy grail. A genius had written an awesome recursive function to set the read-only property on each bean in the bean hierarchy. Inspired by that code I wrote my own makeReadOnly function. You can look at the class file oracle.apps.po.common.webui.ClientUtil.class. The function which makes the page read-only is setViewOnlyRecursive. All you need to do it call this function in the Process Request of your controller with following parameters (oapagecontext, oawebbean). Below is the sample code I wrote to make the Account Overview page read-only and selectively hide columns on various tables so that user could not take any action that would lead to updation of the record. Today this is a std functionality as part of Receivables Inquiry responsibility.
|