Java Reference
In-Depth Information
3.
Click on the “Select or code an action” icon (indicated by the arrow in 12-35) and from the
shortcut menu choose “code an action.”
This brings up the Quick Edit session for a small portion of code within GetEmp java. The tabs along the left are
options for the specific action/method to be created.
4.
On the left of the Quick Edit view, click on the Command tab (indicated by the arrow in
Figure 12-36) and then click anywhere in the source code (in the right of the pane).
Figure 12-36.
Clicking the source code tells RAD to:
A.
Create a doButton1Action method in the pagecode subclass (i.e., GetEmp.java)
B.
Insert comments explaining the type of statements the programmer should enter
C.
Insert a return statement for a null string
D.
Start a Quick Edit session for the doButton1Action method
Notice that Quick Edit does not show (or provide access to) the doButton1Action method header or the method
body's opening and closing braces.
To generate a doButton1Action method in GetEmp.java, the default code in the Quick Edit view must be modified.
5.
In the Quick Edit view, insert the text success between the double quotes of the return
statement and save GetEmp.
Scroll to the end of the GetEmp.java source code and confirm that RAD inserted the following
doButton1Action method.
public String doButton1Action() {
// This is java code that runs when this action method is invoked
// TODO: Return outcome that corresponds to a navigation rule
return "success";
}
Search WWH ::




Custom Search