JHaml icon indicating copy to clipboard operation
JHaml copied to clipboard

Integrate with Spring 3+

Open palmerabollo opened this issue 14 years ago • 3 comments

As a view technology, as Tiles does. Would be a nice enhancement.

palmerabollo avatar Jul 28 '11 21:07 palmerabollo

I would absolutely like to get Spring MVC integration going. A ViewResolver implementation (which Spring requires) would also make the Grails integration cleaner. Seems like the basis of using Haml as a preprocessor for the JSP compiler would no longer work with that approach.

Therefore, the simplest thing to do might be to incorporate Groovy interpreter calls into JHaml's engine. How would you feel about a required dependency on Groovy for JHaml, if it meant Spring integration?

raymyers avatar Jul 28 '11 23:07 raymyers

Would be a great starting point (not really sure about how big the groovy dependency would be).

Some points to take into account:

  • It should be able to have access the available Model attributes (that are set in the controllers)
  • It should be able to have access JSP variables (pageScope, applicationScope...)

palmerabollo avatar Jul 29 '11 06:07 palmerabollo

Adding a groovy dependency would add around 5 to 6 megs. Seems like this would be a good direction.

raymyers avatar Jul 29 '11 19:07 raymyers