June 2002
Intermediate to advanced
400 pages
7h 48m
English
First, let's revisit the Hello application created in Chapter 1, “A Web Objects Primer.” We are going to return the greeting in the form of a JavaScript pop-up window instead of a second page.
Duplicate the Hello project and rename it DynamicHello by following the instructions in Chapter 1.
Open Main.wo in WebObjects Builder. We are going to use an onLoad script to perform the JavaScript alert.
Add the following key to the Main page:
Name: onLoad
Type: String (java.lang.String)
As Variable: NO
Accessors: Only the Method returning the value
Now bind the onLoad key to the WOBody element. Because onLoad isn't a defined binding for WOBody (that is, you wouldn't see it ...