|
From: Darren D. <da...@da...> - 2003-11-11 23:27:26
|
On Tuesday 11 November 2003 22:21, Christophe Vanfleteren wrote: > You can handle such cases using the tiles support in Spring. correct, but perhaps the problem has a wider scope. An app shouldn't be forced to use tiles to get around it IMO, nor do you want redundant and high maintenance code in every controller. Conceptually, the model that a controller returns should be capable of being added to (decorated) with the peripheral data as configured at the view level. Something akin to a servlet Filter, or Sitemesh on steroids. This would leave the controllers lean and focused solely on translating user requests into model/view combinations as they are presently. The 'model-decorators' are free to add to this combination the secondary stuff that is independant of the user request but which still may require the services of business and/or data objects. Is there something already in Spring MVC that lends itself to this kind of behaviour? Best wishes, -- Darren Davison Public Key: http://www.davison.uk.net/key.jsp |