Add TilesViewResolver to enable fallback if tiles definition does not exist [SPR-5689] #10359
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Mark Fisher opened SPR-5689 and commented
Currently the typical way of integrating Tiles is to use a TilesView as the 'viewClass' for a UrlBasedViewResolver. Any UrlBasedViewResolver instance will prevent later resolvers in a chain (those with a higher 'order' value) from being invoked at all, because UrlBasedViewResolvers do not return null. In this particular case, the TilesView will be created and returned even if it the 'url' is an invalid tiles definition name.
However, it should be possible to add an earlier check within a TilesViewResolver implementation since the TilesContainer does provide an isValidDefinition(..) method. That way, we could return null and enable fallback to additional ViewResolvers in the chain.
For one thing, this would allow incremental adoption of Tiles within a large application that is currently using JSP via InternalViewResolver (and JstlView).
Issue Links:
2 votes, 2 watchers
The text was updated successfully, but these errors were encountered: