OAF code using OAScriptBean
OAPageButtonBarBean oapagebuttonbarbean = (OAPageButtonBarBean)webBean.findChildRecursive("PageButtons");
OASubmitButtonBean oasubmitbuttonbean = (OASubmitButtonBean)oapagebuttonbarbean.findChildRecursive"GenerateSignature");
oasubmitbuttonbean.setOnClick("javascript:return test();");
This function is written in the JavaScript file which was included as follows
OAWebBeanFactory oawebbeanfactory = pageContext.getWebBeanFactory();
OAScriptBean oascriptbean = (OAScriptBean)oawebbeanfactory.createWebBean(pageContext, "SCRIPT_BEAN");
oascriptbean.setSource("/OA_HTML/GenerateSignature.js");
webBean.addIndexedChild(oascriptbean);
The above code is written in Controller.
In the JavaScript function generate value and submit the page as below..
document.DefaultFormName.submit();
No comments:
Post a Comment