Adding navigation
As a final step in the development of Hello World, we'll clean up
the wrapper a bit and add some navigation.
- Open Wrapper.wo in WebObjects Builder
- Add a table, with 1 row and 2 columns.
- Select the WHLoginBox, and cut and paste it into the left cell
of the table. Set the width of the cell to 25 percent.
- Remove the WOConditional which used to wrap the login
box.
- Cut and paste the WHSearchBox and WHAreaWrapper into the right
cell. Set the cell's width to 75 percent.
- Select the entire left cell by clicking on the <TD> in
the path view.
- Add a WOConditional to wrap the entire cell (not just its
contents), and set its condition to
helper.user.isGuest
- At the top of the page, add a WOActiveImage. Set its
actionClass to "MyHomePage", set its
framework to "WireHoseLayoutSupport", and its
filename to "wirehose_small_white.gif". Add a
binding named border and set it to 0.
- To the right of the image, type Welcome, add a WOString
with its value set to helper.user.login and type an
exclamation point and (Logout).
- Wrap the (Logout) text in a WOConditional. Set its
condition to helper.user.isGuest and its
negate to true.
- Select the word Logout and add a WOHyperlink with its
actionClass set to "Logout".
- Reload the page and explore Hello World.
Previous |
Next
Copyright ©2000-2003 Gary Teter. All rights reserved. WireHose is a trademark of Gary Teter.