Spring 3.0.5 + Tiles
Inside my controller I'm creating a new ModelAndView but a situation has come up where one company wants their own view. Once this happens I can see this growing where other's want their own as well.
@RequestMapping(params="companyId")
public ModelAndView newCompanyView(HttpServletRequest request, String companyId) {
// right here I'd like to check if the "companyABC" view is a defined tile
// and if it is the send that back as a view and I can eliminate a bunch of if
// checks.
if(companyId.equals("ABC")) {
return new ModelAndView("companyABC", "vo", getCompanyVo());
} else {
return new ModelAndView("company", "vo", getCompanyVo());
}
}
Is this possible and if so then how?