To actually use the calculator, you have to invoke the calculate method of the bean when Calculate is clicked.
In the Page Designer, select the Calculate button. In the Quick Edit view, select Command in the left pane. Click in the right pane and this sample code appears:
// Type Java code that runs when the component is clicked // TODO: Return outcome that corresponds to a navigation rule return "";
Replace the generated action code with the code shown in Example 17-1.
Example 17-1. Action code to invoke the calculate method