Requirement: I have an demo.jspx page. On that demo.jspx page, I have an af:commandButton named as “Click to Launch Popup”. On click of the af:commandButton it should open an af:popup having an af:dialog with three buttons: Yes, No, and Cancel as shown below:
Now the three buttons: Yes, No, and Cancel shown above have the default text. The requirement is to change the text of the three buttons: Yes, No, and Cancel into Click Yes, Click No, and Click Cancel. Thus, the label of the three buttons should be Click Yes, Click No, and Click Cancel as shown below:
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 demo.jspx page. Drag and drop af:commandButton from the component palette on the demo.jspx page. Set the text as text=”Click to Launch Popup”.
Drag and drop af:popup. Drag and drop af:dialog inside the af:popup and set the type of the af:dialog as type=”yesNoCancel”.
Drag and drop af:showPopupBehavior and set triggerType=”click” popupId=”p1″.
Thus, the demo.jspx page is shown below:
Save all and run the application. Thus, the ran application is shown below:
Now the requirement is to change the default text: Yes, No and Cancel to Click Yes, Click No, and Click Cancel.
Step 3: Open the property inspector of the af:dialog. Set AffirmativeTextAndAccessKey=”Click Yes”, CancelTextAndAccessKey=”Click Cancel” , and NoTextAndAccessKey=”Click No” as shown below:
Thus the complete demo.jspx page is shown below:
Save all and run the application. Thus, the ran application is shown below:
Click on Click to Launch Popup to launch the popup 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
478 total views, 2 views today