Book Image

Tapestry 5: Building Web Applications

Book Image

Tapestry 5: Building Web Applications

Overview of this book

Table of Contents (17 chapters)
Tapestry 5
Credits
About the Author
About the Reviewers
Preface
Foreword
Where to Go Next

Adding a Navigation Menu


Let me admit from the very beginning that I am not going to show a production quality menu. That would require a serious use of styles, and I don't want to create such a distraction for you. We are going to use a simple table for layout, and a set of links. This will provide a decent foundation, and you can add any kind of styling to it when you have time.

All work will concentrate on the Border component template. Here is what we want to see when the application is rendered on the AddCelebrity page:

And here are the additions to the Border.tml template that we need to make to achieve this:

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<head>
<title>Celebrity Collector</title>
<link rel="stylesheet"
href="${asset:context:/assets/styles.css}"
type="text/css"/>
</head>
components, Tapestrynavigation menu, celebrity collector example<body>
<p align="right">
<img src="${asset:context:/assets...