Dynamic Web Development with Seaside

11.6Don’t call while rendering

One of the most common mistakes for first-time Seaside developers is to send the message call: a component from another component’s rendering method, renderContentOn:. The rendering method’s purpose is rendering. Its only job is to display the current state of the component. Callbacks are responsible for changing state, calling other components, etc. If you want to render one component inside another one read Chapter 12.

Don’t call: a component from renderContentOn:, only call components from callbacks or from WATask subclasses.

Copyright © 16 April 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.