Thursday 3 May 2018

Make OAF page read-only


In the Controller process request method just write the below code to make whole page read only in one go.

  1. import com.oaframework.toolkit.util.WebBeanUtil;  
  2.   
  3.     public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  
  4.         super.processRequest(pageContext, webBean);  
  5. {  
  6.      // this class loops all the webbean hierarchy and make read only each and even bean and also sets the CSS accordingly.  
  7.   
  8.       WebBeanUtil.setViewOnlyRecursive(pageContext, webBean);  

No comments:

Post a Comment