ViewLocator/ViewModelLocator bummer

Topics: Conventions, Extensibility
Jan 21, 2012 at 9:27 PM
Edited Jan 22, 2012 at 1:08 AM

While updating the docs for the recent changes to the locator classes, I realize that having the optional viewSuffix argument default to "View" in all of the type mapping methods doesn't make a lot of sense in light of the new ability to reconfigure the locator classes for whatever list of View suffixes that you want at configuration. "View" might not even be one of your default View suffixes. In hindsight, when the viewSuffix argument is omitted from calls to the type mapping methods, it would have been more useful to add a type mapping for the first item in the list of registered View suffixes or add a type mapping for each of the registered View suffixes. Of course, this would have required adding an overload for all the type mapping methods, since default values for optional arguments have to be statically defined. Perhaps I'm worrying too much about edge cases. :) Oh, well.