Creating the button programmatically
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
//first excute standard functionality by call super as below
super.processRequest(pageContext, webBean);
//now create new button programatically
OASubmitButtonBean oasb= (OASubmitButtonBean)pageContext.getWebBeanFactory().createWebBean(pageContext,"BUTTON_SUBMIT");
oasb.setID("xxSubmitSendEmailButton");
oasb.setUINodeName("xxSubmitSendEmailButton");
oasb.setEvent("xxSubmitSendEmailButton");
oasb.setText("xxSubmitSendEmailButton");
webBean.addIndexedChild(oasb);
}
Dynamically creating of Advance Table Bean:
private void
setReportSumText(OAPageContext pageContext, OAWebBean webBean)
{
OAAdvancedTableBean advancedTableBean = (OAAdvancedTableBean)webBean.findIndexedChildRecursive("BuyerTableRN");
advancedTableBean.prepareForRendering(pageContext);
if (advancedTableBean != null)
{
OATableFooterBean tableFooterBean = (OATableFooterBean)advancedTableBean.getFooter();
if(tableFooterBean != null)
{
OATotalRowBean totalRowBean = (OATotalRowBean)tableFooterBean.getTotal();
if(totalRowBean != null)
{
totalRowBean.setText("Report-Sum");
}
}
}
}
{
OAAdvancedTableBean advancedTableBean = (OAAdvancedTableBean)webBean.findIndexedChildRecursive("BuyerTableRN");
advancedTableBean.prepareForRendering(pageContext);
if (advancedTableBean != null)
{
OATableFooterBean tableFooterBean = (OATableFooterBean)advancedTableBean.getFooter();
if(tableFooterBean != null)
{
OATotalRowBean totalRowBean = (OATotalRowBean)tableFooterBean.getTotal();
if(totalRowBean != null)
{
totalRowBean.setText("Report-Sum");
}
}
}
}
No comments:
Post a Comment