> On Thu, 10 Nov 2005, Joerg Heinicke 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. > > I thought I've said eactly this: The View knows how to display the > Model (where do you read in my mail that the View changes the Model?)
You didn't write that directly. I guess the difference is just if "editable or not" is a property of the model or the view. >> 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. That (editable = property of the model) is what I wanted to express with this paragraph. Jörg -- Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat, DSL-Flatrate für nur 4,99 Euro/Monat* http://www.gmx.net/de/go/dsl
