-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VelocityToolboxViewResolver and VelocityLayoutViewResolver [SPR-941] #5660
Comments
Shinobu Kawai commented move toolbox support to VelocityToolboxViewResolver |
Shinobu Kawai commented view resolver w/ toolbox support |
Shinobu Kawai commented view resolver w/ layout support |
Shinobu Kawai commented replaces attach #1 for Spring 1.2 (CVS HEAD) |
Shinobu Kawai commented replaces VelocityToolboxViewResolver.java uploaded on 12/May/05 for Spring 1.2 (CVS HEAD) |
Shinobu Kawai commented replaces VelocityLayoutViewResolver.java uploaded on 12/May/05 for Spring 1.2 (CVS HEAD) |
Juergen Hoeller commented A VelocityLayoutViewResolver sounds plausible to me. But why have you factored out the "toolboxConfigLocation" support into a VelocityToolboxViewResolver class? Couldn't it simply stay in VelocityViewResolver? Juergen |
Shinobu Kawai commented VelocityViewResolver#setToolboxConfigLocation looked kind of messy on first impression. The behaviour wasn't intuitive, I usually don't expect a setter to change the state of the instance. Maybe logging a warning that the view class was overwritten would have sufficed. |
Juergen Hoeller commented I've added a fresh cut of a VelocityLayoutViewResolver to both Spring 2.0 M3 and 1.2.7. I've kept the toolbox support in VelocityViewResolver itself, although with a refined initialization procedure. Juergen |
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:
2 votes, 3 watchers
The text was updated successfully, but these errors were encountered: