Apple WebObjects 3.5 Tools And Techniques User Manual

Browse online or download User Manual for Software Apple WebObjects 3.5 Tools And Techniques. Apple WebObjects 3.5 Tools And Techniques User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 88
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews

Summary of Contents

Page 1 - TOOLS AND TECHNIQUES

WEBOBJECTSTOOLS AND TECHNIQUES

Page 2 - Art: Karin Stroud

Chapter 1 Setting Up WebObjects Applications10The New Project panel has a Project Type pop-up list that lets you choose the type of project you want t

Page 3 - Contents

Creating WebObjects Application Projects116. Type the name of the project you want to create.7. Click Save.The New Project panel shows the path you sp

Page 4

Chapter 1 Setting Up WebObjects Applications12Java and Objective-C are compiled languages. WebScript, which is based on Objective-C, is a scripted lan

Page 5 - Table of Contents

Chapter 1 Setting Up WebObjects Applications13Project Builder displays a browser showing the contents of your project. The first column lists several c

Page 6

Chapter 1 Setting Up WebObjects Applications14The New File panel comes up with the suitcase you selected open by default.3. Type the name of the item

Page 7 - Chapter 1

The Structure of a WebObjects Application Project15In addition, you can drag a file directly onto the suitcase icon in the browser, and the file is copi

Page 8

Chapter 1 Setting Up WebObjects Applications16behavior. The name of each one is the component’s name followed by a specific file extension. These are th

Page 9

The Structure of a WebObjects Application Project17Started With WebObjects for more information on using the Wizard with databases.4. Specify the lang

Page 10 - /WebObjects

Chapter 1 Setting Up WebObjects Applications18• The Application.wos and Session.wos files, if your application’s primary language is WebScript• Configur

Page 11 - Choosing Assistance

The Structure of a WebObjects Application Project19To add an existing subproject (such as ClientSideJava or CommonJava) to your project:1. Double-cli

Page 12 - Double-click here to open

Apple, NeXT, and the publishers have tried to make the information contained in this manual as accurate and reliable as possible, but assume no respon

Page 13

Chapter 1 Setting Up WebObjects Applications20Every WebObjects Application project includes several frameworks by default. When you build, your applic

Page 14 - Enter new file name here

Editing Your Project’s Source Files21Opening an Existing ProjectTo open an existing project from Project Builder:1. Choose Project m Open.2. In the O

Page 15 - Web Components

Chapter 1 Setting Up WebObjects Applications22• If you use Java or Objective-C, all code files appear in the Classes suitcase. On disk, they live at th

Page 16 - Main.wod

Editing Your Component’s HTML and Declarations Files23Editing Your Component’s HTML and Declarations FilesWhile you must use Project Builder to edit y

Page 17 - Resources

Chapter 1 Setting Up WebObjects Applications24changes to your components (the .html, .wod, or .wos files) and test them without rebuilding.Note: When y

Page 18 - Subprojects

Building Your Application25The Application WrapperWhen you build your project, Project Builder creates an application wrapper,which is a folder whose

Page 19 - Frameworks

Chapter 1 Setting Up WebObjects Applications26When you launch your application, your machine’s web browser is launched by default and it accesses your

Page 20

Converting Old Projects27will reside under the document root, usually DocumentRoot/WebObjects.The file contains a line you can uncomment for this purpo

Page 21 - Opening an Existing Project

Chapter 1 Setting Up WebObjects Applications28Performing the ConversionTo convert your project, open it in Project Builder. (It’s a good idea to crea

Page 22

Converting Old Projects29Moving Your ImagesAfter the project is converted, there are additional changes you may want to make in order to take advantag

Page 25 - Launching Your Application

Editing With WebObjects BuilderChapter 2

Page 27 - Converting Old Projects

33IntroductionWebObjects Builder is an application that provides graphical tools for creating dynamic web pages (components). This chapter describes t

Page 28 - Performing the Conversion

Chapter 2 Editing With WebObjects Builder34Note: Depending on the width of the window, the toolbar may appear in two rows or one.The WebObjects Builde

Page 29 - Moving Your Images

The WebObjects Builder Toolbar35• Graphical mode shows a visual representation of your component, including its dynamic elements. The bottom pane, the

Page 30

Chapter 2 Editing With WebObjects Builder36The Preferences panel provides several options for how text is displayed in both graphical and source editi

Page 31 - Chapter 2

Chapter 2 Editing With WebObjects Builder37: This color well allows you to set the color of the currently selected text. To change the color, click

Page 32

Chapter 2 Editing With WebObjects Builder381. Place the cursor where you want the element to appear on the page.2. Click the toolbar button representi

Page 33 - The Component Window

The Inspector39Some elements (such as text fields and text areas) can be selected simply by clicking them; they appear with a gray line underneath.Othe

Page 35 - Main.wod) file. When you bind

Chapter 2 Editing With WebObjects Builder40The top of the window shows the element path to the selected element. Any element can be contained in a hie

Page 36 - Entering Text

Structure Elements41ListsClick to create a new list. If there is a selection, each line in the selection becomes a list item (<LI>). By default

Page 37

Chapter 2 Editing With WebObjects Builder42Custom MarkerNot all legal HTML elements can be created directly using WebObjects Builder’s buttons or menu

Page 38 - Selecting Elements

Working With Tables43You can also enter source editing mode and type the marker and its text directly.Tip: To save a custom element so you can use it

Page 39 - The Inspector

Chapter 2 Editing With WebObjects Builder44To add a column, click the icon at the upper right of the table. The column is added at the right of th

Page 40 - Structure Elements

Working With Tables45• Split a selected cell horizontally by clicking or vertically by clicking .• Merge a group of selected contiguous cells into a

Page 41 - Horizontal Rule

Chapter 2 Editing With WebObjects Builder46•To set the width or height of a cell, select the cell and use the Table Data Inspector. Changing a cell’s

Page 42 - Custom Marker

Creating Hyperlinks47Creating HyperlinksThere are two types of hyperlinks that you can use in a WebObjects application:•A static hyperlink (which uses

Page 43 - Working With Tables

Chapter 2 Editing With WebObjects Builder48Setting Page AttributesThe top level in the element hierarchy is always the page itself. To inspect a page’

Page 44 - Table Editing Modes

Setting Colors49Setting ColorsWebObjects Builder allows you to set the colors for a page’s background, selected text, and hyperlinks. To set the colo

Page 45 - Sizing Tables

vTable of ContentsContents iiiSetting Up WebObjects Applications 7Introduction 9Creating WebObjects Application Projects 9Choosing Assistance 11Choosi

Page 46

Chapter 2 Editing With WebObjects Builder50The icons at the top of the palette window show the available palettes. To select a palette, click its icon

Page 47 - Creating Hyperlinks

Palettes51If the palette’s background is gray, you can’t make any changes to it. To enable editing, choose Palettes m Make Editable. The palette'

Page 48 - Setting Page Attributes

Chapter 2 Editing With WebObjects Builder52Note: If the palette is editable, you can drag the item to the window, but it will disappear from the palet

Page 49 - Palettes

Working With Dynamic ElementsChapter 3

Page 51

55Introduction to Dynamic ElementsA dynamic element is an element whose exact HTML representation isn’t determined until run time. Dynamic elements ar

Page 52 - Changing a Palette Icon

Chapter 3 Working With Dynamic Elements56For example, a dynamic hyperlink (WOHyperlink) has an action attribute that specifies an action method in the

Page 53 - Working With Dynamic Elements

Creating Dynamic Elements57In addition, you can also drag a model file (of type .eomodeld) into a component to create a variable of type WODisplayGroup

Page 54

Chapter 3 Working With Dynamic Elements58The element appears in the HTML template. A template appears in the lower pane (the declarations file) showing

Page 55 - Attributes

Chapter 3 Working With Dynamic Elements59The first column of the object browser displays two types of objects:• Keys are displayed above the horizontal

Page 56 - Creating Dynamic Elements

viWorking With Dynamic Elements 53Introduction to Dynamic Elements 55Attributes 55Creating Dynamic Elements 56Using the Toolbar 56Dragging Elements in

Page 57 - Using the Add WebObject Panel

Chapter 3 Working With Dynamic Elements60There are several ways to add items to the object browser:• Use Project Builder to add keys and actions to yo

Page 58 - The Object Browser

Chapter 3 Working With Dynamic Elements61When you choose Add Variable/Method, the following panel opens:In this panel, you specify:• The name of the k

Page 59

Chapter 3 Working With Dynamic Elements62When you choose Add Action, the following panel appears:When you click Add, the following code is added to yo

Page 60

Chapter 3 Working With Dynamic Elements63Note: To delete a key or action, you must delete it from the source code in Project Builder. Also, the Add

Page 61 - Type the variable name here

Chapter 3 Working With Dynamic Elements64• Drag a model (a folder with the extension .eomodeld) from the file system into the object browser in your co

Page 62

Chapter 3 Working With Dynamic Elements65In the figure, if you choose the entity CarPackage as the variable’s type, the following code gets added to yo

Page 63 - Adding Display Groups

Chapter 3 Working With Dynamic Elements66In the object browser, means that the display group has been configured. A means that it has not been confi

Page 64

Chapter 3 Working With Dynamic Elements67• Entity: The Entity combo box has a list of entities from the models in your project. You can select one fro

Page 65 - Configuring the Display Group

Chapter 3 Working With Dynamic Elements68As with other display groups, you can use the Display Group Options panel to immediately configure the newly c

Page 66

Chapter 3 Working With Dynamic Elements69In the figure, you have added a dynamic text field (WOTextField) to your component. Note the blue triangle in t

Page 67

Setting Up WebObjects ApplicationsChapter 1

Page 68 - Binding Elements

Chapter 3 Working With Dynamic Elements70window. Some (not all) dynamic elements display the binding for their default attribute inside the element it

Page 69

Binding Elements71This time, a different attribute is selected, since the default attribute has already been bound.2. Click Connect Variable to bind t

Page 70

Chapter 3 Working With Dynamic Elements72• Keys must specify their full key path. For example, to bind the key that is selected in the following figure

Page 71 - Joe) must not be in quotes

Dynamic and Static Inspectors73WOForm itself, don’t receive information but contain an action attribute representing an action to be taken when the fo

Page 72

Chapter 3 Working With Dynamic Elements74To switch back to the WOText Inspector, select Dynamic Inspector from the pop-up list. In addition, you can

Page 73 - Dynamic and Static Inspectors

Creating Other WebObjects75If you convert a static element to its dynamic counterpart by clicking Make Dynamic, and there is no direct counterpart, th

Page 74 - Select Dynamic Inspector to

Chapter 3 Working With Dynamic Elements76To create a dynamic element, you click its toolbar icon. One thing to be aware of is what happens when there

Page 75 - Creating Other WebObjects

Creating Other WebObjects77time. A WOString is abstract in that it doesn’t represent any specific element, but it can be contained in any other HTML el

Page 76 - Dynamic Strings

Chapter 3 Working With Dynamic Elements78RepetitionsA repetition (WORepetition) is a container element that repeats its contents a certain number of t

Page 77 - Dynamic Hyperlinks

Creating Other WebObjects79When you wrap a repetition around a table row, the repetition symbol doesn’t appear. Instead, a blue border appears around

Page 79 - Conditionals

Chapter 3 Working With Dynamic Elements80the WOConditional’s contents are displayed. If condition is false (0), the contents aren’t displayed. conditi

Page 80 - YES (true)

Creating Other WebObjects81Custom WebObjectsYou use custom WebObjects for two main purposes:•To implement WebObjects element classes not directly supp

Page 81 - Custom WebObjects

Chapter 3 Working With Dynamic Elements82the WOExtensions framework, which is included in your project by default.If WebObjects Builder recognizes the

Page 82 - Generic WebObjects

Creating Other WebObjects831. Click in the toolbar. 2. Bring up the Inspector.A generic WebObject element has one required attribute, elementName,wh

Page 83

Chapter 3 Working With Dynamic Elements84Dynamic ImagesThe elements WOImage and WOActiveImage are dynamic images. At run time, WOImage is rendered as

Page 84 - WOApplets

Reusable Components85appears in your component, with its code attribute set to the name of the file.• Drag an element from the Client-Side Components p

Page 85 - Reusable Components

Chapter 3 Working With Dynamic Elements86• Use the toolbar to add a custom WebObject element (see “Custom WebObjects”) to your page, then use the Insp

Page 86 - .api file for the component

Reusable Components87The Inspector shows the child component’s attributes. As with any other dynamic element, you can bind the child component’s attri

Page 88

9IntroductionTo develop WebObjects applications, you use two primary tools: Project Builder and WebObjects Builder. These tools help you perform the

Comments to this Manuals

No comments