Adding a decision message
We are now going to add a decision message to our page. We will use the previous recipe so that a decision message appears before executing the SQL code.
How to do it...
To add a decision message, perform the following steps:
In Application Navigator, open the EmpSocietiesCO.java controller.
In the
EmpSocietiesCO.java
file, scroll down to theprocessFormRequest
method.In the
plsqlButton
event, add a new line after the declaration ofparamSocietyId,
as shown in the following screenshot:Now, we are going to comment out the call to the
insertSocietyLog
method (step 1). Then, we will define the warning message and create an instance of a dialog message (Step 2).The following code needs to be added:
Next, add two string values to define the button text for the
Yes
andNo
buttons (Step 3).Next, we will add the code to create an instance of a dialog message and set the
Yes
orNo
variable for the buttons (Step 4).Next, we will convert the
Yes
andNo
buttons to the submit buttons...