core icon indicating copy to clipboard operation
core copied to clipboard

Spring bind in Velocity templates

Open sheltonn opened this issue 12 years ago • 4 comments

Is there any plan to support Spring Binding in Velocity templates?

http://docs.spring.io/spring/docs/3.1.x/spring-framework-reference/html/view.html#view-velocity-forms

This would save us a ton of time in our velocity templates.

sheltonn avatar Mar 21 '14 20:03 sheltonn

Shelton, you might be able to setup support in an OSGi plugin in your web-ext.xml file which contains the new tab libraries. Since their using Spring 3+ main libraries it should all work.

ethode avatar Mar 24 '14 14:03 ethode

Yea we don't have direct support but you can wire some things in spring but you might have to alter our view resolver. RIght now we do not do this.

jtesser avatar Mar 24 '14 18:03 jtesser

Jason, that's a good point, the view resolver isn't using the standard view resolver for Spring instead it's using com.dotcms.spring.web.DotViewResolver - you might have to extend this class to contain some logic - the default resolver for velocity templates is org.springframework.web.servlet.view.ResourceBundleViewResolver, but dotcms is extending org.springframework.web.servlet.ViewResolver

ethode avatar Mar 24 '14 18:03 ethode

This issue has been automatically marked as stale because it has not had activity within the past 90 days. It will be closed in 30 days no further activity occurs. Thank you.

stale[bot] avatar Sep 29 '19 07:09 stale[bot]