Wed. Aug 4th, 2021

Requirement:  I have an inputDateDemo.jspx page. On that inputDateDemo.jspx page, I have three fields: af:selectOneChoice, af:inputDate, and af:chooseDate components. Based on the item I select inaf:selectOneChoice the language translation should happen. And, also I should be able to change the date for all the languages. As of now, it is working fine for English and Russian language. But I am not able to select date from af:inputDate, and af:chooseDate components for Mongolian, Kazakh, and Kyrgyz languages.

Solution: For solution to the above requirement follow the steps as shown below:

Step 1: Create an Oracle ADF Fusion Web Application.

Step 2: Create an inputDateDemo.jspx page. Drag and drop choice from the component palette on the inputDateDemo.jspx page as shown below:

Select Create list(select item) and create the list items as shown below:

Click Next. Set the Label as Select Language. The Select Language text we will set in the ResourceBundle as shown below:

Click Save and Select. Thus the Label is set as shown below:

Click Finish.

Set partialTriggers=”soc1″ and autoSubmit=”true” for  the af:selectOneChoice component.

Set valueChangeListener=”#{backingBeanScope.MyBean.languageChange}”

Step 3: Drag and drop af:inputDate from the component palette. Set label=”#{viewcontrollerBundle.SELECT_DATE}”. Set partialTriggers=”soc1″.

Thus, the complete inputDateDemo.jspx code is shown below:

Step 4: Create five ResourceBundles as shown below:

The content of each of the five bundle are shown below:

ViewControllerBundle
ViewControllerBundle_ru
ViewControllerBundle_mn
ViewControllerBundle_ky
ViewControllerBundle_kk

Step 5: Write the below code for the languageChange ValueChangeEvent.

Save all and run the application. Thus the ran application is shown below:

Select Language as RU-Mongolian and Select Date as 6/13/2016. Date should be picked from the af:inputDate. Don’t enter the Date manually. Thus we are able to Select Date as shown below:

Select Language as RU- Kyrgyz and Select Date as 6/13/2016. Date should be picked from the af:inputDate. Don’t enter the Date manually. Thus we are not able to Select Date. The af:inputDate is not responding as shown below:

Step 6: Thus to fix the above issue, put <formatting-locale>#{request.locale}</formatting-locale> in the trinidad-config.xml file as shown below:

Step 7: Save all and run the application. Thus, the ran application is shown below:

Here whatever Language we select the af:inputDate component will always work.

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

 416 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 *