Anil's Blog is Best Viewed on GOOGLE CHROME

Thursday, April 30, 2009

RADIO GROUP EVENT

import oracle.apps.fnd.framework.webui.beans.message.OAMessageRadioButtonBean;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageRadioGroupBean;

//If you want your radio buttons to behave as a group, you must programmatically assign them all the same name by calling setName() for each radio button.

public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);


OAMessageRadioButtonBean appleButton =
(OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonOne"); //First Radio Button
appleButton.setName("fruitRadioGroup");
appleButton.setValue("APPLES");

OAMessageRadioButtonBean orangeButton =
(OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonTwo"); //Second Radio Button
orangeButton.setName("fruitRadioGroup");
orangeButton.setValue("ORANGES");
}


public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);

//You can then obtain the selected radio button in your processFormRequest() as follows:

String radioGroupValue = pageContext.getParameter("fruitRadioGroup");
}


A know issue comes while implementing Radio Group refer to below link for more details:
Value that you need to set declaratively

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.