3.6.8Rendering the Behavior
Interactions between the browser and Seaside are done using callbacks in the Smalltalk code, and these are entered, directly or indirectly, in the WAComponent>>renderContentOn:
method.
In the System Browser select the method and edit it to:
WebCounter>>renderContentOn: html
html heading: count.
html anchor
callback: [ self increase ];
with: '++'.
html space.
html anchor
callback: [ self decrease ];
with: '--'
This adds two anchors with increment (++) and decrement (—) links that call back to our increase and decrease methods. Save the method. Then go back to the web browser and refresh the page to see the change.
Click the new links a few time to verify that it works.
That’s it. You developed your first Seaside component in VisualWorks.