Hash table in oaf
Hash table is uses in the OAF page , when we have an Requirment to submit the OAF page though our keyboard Enter Button. Hashtable helps to fire the submit event in the OAF page through the Enter Keyword in the OAF Page.We
will make the use of OABoundValueEnterOnKeyPress API & will
associate ON_KEY_PRESS_ATTR attribute with the bean that needs to
submit the page when ENTER key is pressed.
Here below i will share the code to use the Hash table in the OAF Page.
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import java.util.Hashtable;
import oracle.apps.fnd.framework.webui.OABoundValueEnterOnKeyPress;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
//Enter Button Handling
//FullName is the Id of the bean in which user will enter some value and press Enter Button
OAMessageTextInputBean FName = (OAMessageTextInputBean)webBean.findChildRecursive("FullName");
if (FName != null)
{
Hashtable params = new Hashtable();
params.put ("Go", "Go");
import java.util.Hashtable;
import oracle.apps.fnd.framework.webui.OABoundValueEnterOnKeyPress;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
//Enter Button Handling
//FullName is the Id of the bean in which user will enter some value and press Enter Button
OAMessageTextInputBean FName = (OAMessageTextInputBean)webBean.findChildRecursive("FullName");
if (FName != null)
{
Hashtable params = new Hashtable();
params.put ("Go", "Go");
HelloName.setAttributeValue(OAWebBeanConstants.ON_KEY_PRESS_ATTR,
new OABoundValueEnterOnKeyPress(pageContext,
"DefaultFormName", //enclosing form name
params,
true, //client validated
true)); // server validated
}
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("Go") != null)
{
//This is the Place where we put the code of the Submit Button so in the same way we keep the code for 'Go' Parameter for Enter Key.
}
39. }
new OABoundValueEnterOnKeyPress(pageContext,
"DefaultFormName", //enclosing form name
params,
true, //client validated
true)); // server validated
}
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("Go") != null)
{
//This is the Place where we put the code of the Submit Button so in the same way we keep the code for 'Go' Parameter for Enter Key.
}
39. }
0 comments:
Post a Comment