Wednesday 26 September 2018

Single select radio button in oaf : How to Create Single select radio button in oaf

Single select radio button in oaf : How to Create Single select radio button in oaf

In this post , We will discuss about Single select radio button in oaf. Single select radio button 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 complete steps to create Single select radio button in oaf.
 
 

How to Create Single select radio button in oaf

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'
 


Single select radio button in oaf
 
 
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");
 
 

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

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *