OAF message radio group example
In this post , We will discuss about OAF message radio group example. OAF message radio group means , if we have 3 radio button in the OAF page and we want that user can click/select only 1 radio button at one time. So it means in the Single Select radio button in oaf we can only select one radio button at one time between all the available radio buttons. Here below I will share the OAF message radio group example.
OAF message radio group example
Step1:- For Example You are creating two Radio button in the OAF page (Male & Female) and we want user can select only one option between these two.
Step2:- Create Item in the OAF page under J-Developer. Select Item style as Message Radio Button.
Step3:- Now set the properties of the Radio Button Item , With Checked Values 'Y' and Unchecked Values 'N'
Step4:- Now We need to put some Code in the OAF Page Controller Process Request Method.
Process Request Method
OAMessageRadioButtonBean MaleButton=(OAMessageRadioButtonBean )webBean.findChildRecursive("Male"); --1st Radio Button--
MaleButton.setName("SexGroup");
MaleButton.setValue("Y");
OAMessageRadioButtonBean FemaleButton =(OAMessageRadioButtonBean )webBean.findChildRecursive("Female"); --2nd Radio Button--
FemaleButton.setName("SexGroup");
FemaleButton.setValue("N");
MaleButton.setName("SexGroup");
MaleButton.setValue("Y");
OAMessageRadioButtonBean FemaleButton =(OAMessageRadioButtonBean )webBean.findChildRecursive("Female"); --2nd Radio Button--
FemaleButton.setName("SexGroup");
FemaleButton.setValue("N");
Process Form Request Method
Now Fetch the Value from the Radio Group in the Process From Request Method of the Controller.
String value= pageContext.getParameter("SexGroup");
0 comments:
Post a Comment