beautypg.com

Apple WebObjects 3.5 User Manual

Page 5

background image

v

Table of Contents

Contents iii

Preface 7

About WebObjects 9

About This Book 9

Where to Go From Here 10

Creating a Simple WebObjects Application 11

Creating a WebObjects Application Project 14

Choosing the Programming Language 16

Examining Your Project 17

Launching WebObjects Builder 18

Creating the Page’s Content 20

Entering Static Text 21

Using the Inspector 22

Creating Form-Based Dynamic HTML Elements 23

Resizing the Form Elements 25

Binding Elements 27

Creating Variables 27

Binding the Input Elements 29

Implementing an Action Method 30

Creating the Application’s Output 32

Building and Running Your Application 35

Enhancing Your Application 37

Duplicating Your Project 39

Creating a Custom Guest Class 41

Binding the Class’s Instance Variables to the Form Elements 42

Creating a Table to Display the Output 43

Adding Dynamic Elements to Table Cells 45

Binding the Dynamic Elements in the Table 45

Creating the Guest Object 46

Keeping Track of Multiple Guests 47

Creating a Guest List 48

Adding Guests to the Guest List 50

Adding a Second Component 51

Using a Repetition 53

Adding the Finishing Touches 56

Clearing the Guest List 56

Adding a Dynamic Hyperlink 57

Creating a WebObjects

Database Application 59

The Movies Application 62

Enterprise Objects and Relationships 63

Designing the Main Page 65

Starting the WebObjects Application Wizard 65

Specifying a Model File 66

Choosing an Adaptor 67

Choosing What to Include in Your Model 68

Choosing the Tables to Include 71

Specifying Primary Keys 71

Specifying Referential Integrity Rules 72

Choosing an Entity 74

Choosing a Layout 75

Choosing Attributes to Display 76

Choosing an Attribute to Display as a Hyperlink 77

Choosing Attributes to Query On 77

Running Movies 78

Examining Your Project 79

Examining the Variables 80

Examining the Bindings 81

Refining Main.wo 85

Specifying a Sort Order 86

Specifying Default Values for New Enterprise Objects 87

Setting a Date Format 88

Setting a Number Format 89

Optional Exercise 90