On 10.11.2005 19:50, Giacomo Pati wrote:
The widgets in the repeater rows need to be displayed wrt some properties of a single object (let's say its a 'state of completness'). Now from MVC POV it's the viewer (template) that knows how to display the properties of the business model and thus needs a way to instruct the technology used (CForm) to respect that.
Sorry, but I absolutely don't follow you here. MVC is for decoupling model, view and controller, i.e. to have as few as possible dependencies between the three aspects. There are three you need: the controller changing the model, the controller selecting the view and the view accessing the properties of the model. But the latter one must be a read-only process, otherwise the view does not only depend on the model, but also the model on the view, as the view would not be interchangeable.
In your sample a property of the model (viewable or not, editable or not) shall be changed by the view, what is plain wrong IMO. It is the task of the controller to take care of it.
Actually the flow is supposed to be glue code between Controller and Model of MVC not actually the Viewer part.
Isn't flow supposed to be *the* controller (or at least part of it)? Jörg
