views:

61

answers:

1

I want to set values for form labels from the controller. Can I send List<String> as parameter and have the form to set individual labels OR set the values for each and every labels from controller class?. I am confused with the level of extracting the logic from the form.

A: 

i assume you use Presentation Model pattern (no matter what UI Framework you use).

you can make all of your form label as a single Property (of course with a notification ability) on your Presentation Model and bind it with the Form Label in the view.

If you passing List it would less natural, harder to read and require more code on unit testing.

BUT Form label is View-Specific it will deal with localization or internationalization it would be better to just put it on the view not in the Presentation-Model

ktutnik