Description
Shinobu Kawai opened SPR-941 and commented
Currently, you can't inject a configured VelocityLayoutView into the VelocityViewResolver. (Or can you?)
I created a VelocityToolboxViewResolver and a VelocityLayoutViewResolver to solve my problem. The whole structure kind of smells, but it looks clean for now. :)
For the VelocityToolboxViewResolver, you can add the "toolboxConfigLocation" property to specify your toolbox.xml as you would in VelocityToolboxView. This causes some backward incompatability, as I moved the property down from VelocityViewResolver, but all you have to do is change the view resolver class name. (And it was added in 1.2rc2 anyways.)
For the VelocityLayoutViewResolver, in addition to the toolbox stuff, you can add the "layoutUrl", "layoutKey" and "screenContentKey" properties in respect with the same properties of VelocityLayoutView.
Attachments:
- SPR-941.VelocityViewResolver.patch (2.17 kB)
- SPR-941.VelocityViewResolver.patch (2.08 kB)
- VelocityLayoutViewResolver.java (3.95 kB)
- VelocityLayoutViewResolver.java (4.00 kB)
- VelocityToolboxViewResolver.java (2.97 kB)
- VelocityToolboxViewResolver.java (3.02 kB)
2 votes, 3 watchers