Apple WebObjects 3.5 User Manual
Page 31
Binding Elements
31
3. From the “Page returned” pop-up menu, select
null
.
The value returned by an action method represents the next page
(component) to be displayed. When you return
null
(or
nil
if using
WebScript), the current page is redrawn. In a later task, you’ll see how
to return a new component.
4. Click Add.
The
submit
action appears below a horizontal line in the first column
of the object browser.
5. Click
submit
in the object browser and drag the cursor to the submit
button.
The Inspector opens with the button’s
action
attribute selected.
6. Click Connect Variable.
You just bound the
submit
method you created to the
action
attribute of
the WOSubmitButton. You don’t need to write any additional code, so
your application is now ready to run. However, you may want to look at
your source file.
7. From the pull-down menu at the bottom of the window, choose View
Source File.
Project Builder becomes active and displays the code for your
component (in
Main.java
). You’ll notice that this file contains declarations
for the variables you created earlier, as well as a declaration for the
submit
action method.