Sun. Oct 24th, 2021

Requirement: I have a web page demo.jspx. The page has an af:selectOneChoice containing all the DepartmentName from the Departments table of the HR schema.. Whenever I select any DepartmentName in the af:selectOneChoice, it should display a the selected value in the bean.

Solution: To solve the above requirement follow the steps as shown below:

Step 1: Create an Oracle ADF Fusion Web Application.

Step 2: Create a ViewObject DepartmentsVO through Custom SQL Query for the Departments table. The query used to create the DepartmentsVO is shown below:

select DEPARTMENT_ID,DEPARTMENT_NAME,MANAGER_ID,LOCATION_ID from departments;

Step 3: Create a List of Values for the DepartmentName column. This LOV should display all the DepartmentName.

Step 4: Create a demo.jspx page in the ViewController project of our application created in Step 1. From the AppModuleDataControl expand DepartmentsVO1, select DepartmentName attribute and drag and drop on the demo.jspx as an af:selectOneChoice.

Step 5: Create a valueChangeListener=”#{pageFlowScope.MyBean.selectedValue}” for the af:selectOneChoice and make the autoSubmit=”true”. Thus the complete demo.jspx code is shown below:

Step 6: Go to MyBean and write the code as shown below:

Step 7: Save All and run the application.

Step 8: The ran application is shown below:

Step 9: Now when we select some value say (Human Resources) in the af:selectOneChoice component the corresponding value get printed in the bean as shown below:

Hence, the solution to our requirement.

If you like the post please comment, share, and do join me on Facebook. Please subscribe to my YouTube Channel for video tutorials.

Thanks & Regards,
Susanto Paul

 451 total views,  2 views today

By Susanto Paul

Susanto is an Oracle ACE, a qualified MCA, MBA, and a highly-skilled Senior Oracle Specialist. He is an enthusiastic Blogger and YouTuber who helps learners to solve their complex problems more efficiently. He has 9+ years of experience in multiple technologies like AWS, Oracle ADF, Oracle APEX, Oracle JET, Oracle VBCS, Oracle IDCS, Oracle PL/SQL, Oracle Integration Cloud, Java, JDBC, Servlets, JSP, Spring, Hibernate, HTML5, CSS3, JavaScript, TypeScript, NodesJS, Angular, MySQL, Oracle WebLogic Server, JUnit, JMeter, Selenium Web Driver, etc. He is a certified: Oracle Certified Professional Java SE 6 Programmer, Oracle ADF 11g Certified Implementation Specialist, Oracle Cloud Platform Application Integration 2020 Certified Specialist, Oracle Cloud Infrastructure Foundations 2020 Certified Associate, and Oracle Cloud Infrastructure Developer 2020 Certified Associate

Leave a Reply

Your email address will not be published. Required fields are marked *