DarthFubuMVC/FubuMVC.Core.UI — pull request #19 by chadmyers (2013-05-14 15:25:48+00:00)
Title: Issues16and18

Pull request that addresses Issues #16 and #18

#16 was cosmetic. There were 3 overloads each for DisplayFor and InputFor, but only 2 overloads for LabelFor. This adds the 3rd to the set to round it off nicely.

#18 fixes an issue you may encounter if you call a partial in a for each loop and try to use DisplayFor or InputFor in that partial. If you had 3 items in an array and for-each them with partials and call DisplayFor / InputFor, the HTML output would only reference the first item in the array for all three partials. There were a couple ways to fix this. After a chat with @jeremydmiller we decided that the quickest way to fix this was in the extension methods. We discussed a more elaborate, longer-term fix to add a model context stack that pushes before a view/partial is rendered and pops when it is done. For now we punted on that idea as it would involve substantial changes in FubuMVC.Core as well as FubuMVC.Core.UI

I added an integration (end-to-end) test to demonstrate the issue #18 problem and it went green after my changes.