Dynamic Web Development with Seaside

15.2Defining the View

First, we define a component to see the item list. For that, we define a new component named ToDoListView.

WAComponent subclass: #ToDoListView
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'ToDo-View'

We can register the application by defining the class method initialize as shown and by executing ToDoListView>>initialize.

ToDoListView class>>initialize
"self initialize"
WAAdmin register: self asApplicationAt: 'todo'

You can see that the todo application is now registered by pointing your browser to http://localhost:8080/config/ as shown in Figure 98.

The application is registered in Seaside

If you click on the todo link in the config list you will get an empty browser window. This is to be expected since so far the application does not do any rendering. Now if you click on the halo you should see that your application is present on the page as shown in Figure 99.

Our application is there, but nothing is rendered

Now we are ready to work on the rendering of our component.

Copyright © 19 March 2024 Stéphane Ducasse, Lukas Renggli, C. David Shaffer, Rick Zaccone
This book is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.

This book is published using Seaside, Magritte and the Pier book publishing engine.