2009年9月16日星期三

[fw-mvc] ways of rendering forms

Since someone recently raised the topic of Matthew's slides at the Dutch '09 conference, I went and looked at those. There was a slide that had some approaches I haven't seen examples of. The slide (150) says:

Recommendations

-Either pass the form to the view, or pull it from the model within the view

    (Seth: I'm unfamiliar with the latter option. Anyone have a code example??)

-Configure decorators in the view, if customizations are needed (view logic)

    (Seth: I would assume related to the above, once "pulled" into the view, you can addDecorator(). Correct? Is this what is meant? An example would also be useful.)

-For truly complex markup, render individual decorators within the markup

    (Seth: I know the "how", meaning the syntax, for rendering an individual element, but not sure in the big picture what this option is describing. If I'm assigning decorators to elements, why do I need to explicitly call a render method? I thought it automatically rendered?)

This would make for a great tutorial (given the other recent thread highlighting the need for more tutorials) :-).


Seth Atkins

没有评论: