How to hide a button in oaf page
In this post , We will be discuss about how to hide a button in oaf page. We have the option of Controller extension in oaf page , through which we can hide a button in oaf page. Using controller extension , we can hide or disable the button in oaf page. Here below is the detail about how to hide a button in oaf page.
Step by Step to hide a button in oaf page
Step1:- To achieve this Requirement in the standard OAF page , We need to first Find the Controller of the OAF page and then after that we will extend this controller through Controller extensions. If you want to learn more about Controller Extension then refer this post Controller Extension Steps
Step2:- Put this Below code in the Process Request method of the Controller. Process Request Method calls when OAF page loads or Open in the application. Then your custom code will execute and it will enable/disable the button based on your logic.
Process Request Method of the Controller
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
OAApplicationModule oa=(OAApplicationModule)pageContext.getApplicationModule(webBean);
OASubmitButtonBean CreateButton = (OASubmitButtonBean)webBean.findChildRecursive("Create");
CreateButton.setRendered(true);
0 comments:
Post a Comment