Discussion:
[FreeMarker-user] Spring MVC 3 with SpEL, Tiles and Freemarker?
MiB
2012-08-03 11:58:56 UTC
Permalink
Do anyone of you guys have experience of building projects with Spring
MVC 3 using SpEL, Tiles with Freemarker and could tell me whether this
is viable at all?

Can I just use SpEL instead of EL or do I have to use both in my
project?

I'm currently replacing jspx views in a Spring MVC 3 project initially
set up by Spring Roo. Naturally, I'd like to use SpEL in Freemarker
templates, but as I'm still quite a newbie with Freemarker I would
very much like just a clue on what is possible or preferrable.

Open for thoughts and ideas in this area.


/MiB
misuss
2012-10-09 16:27:32 UTC
Permalink
Here is part of template using SpEL as FreeMarker directive: <@spel
expression="We say '{@greetingBean.printGreeting(name)}'"/> from
Freemarkerthe template evaluation result is: We say 'Hello Felix' from
***@greetingBean is standard Spring bean (contains 'Hello' greeting
field)name is FreeMarker model attribute (set up as 'Felix')This is usable
only for simple SpEL expressions producing String output.For details follow
this
post:http://adaptiweb.blogspot.sk/2012/10/freemarker-template-with-spring.html



--
View this message in context: http://freemarker.624813.n4.nabble.com/Spring-MVC-3-with-SpEL-Tiles-and-Freemarker-tp4654186p4654345.html
Sent from the freemarker-user mailing list archive at Nabble.com.
misuss
2012-10-09 16:30:07 UTC
Permalink
Here is part of template using SpEL as FreeMarker directive:
<@spel expression="We say '{@greetingBean.printGreeting(name)}'"/> from
Freemarker

the template evaluation result is: We say 'Hello Felix' from Freemarker

@greetingBean is standard Spring bean (contains 'Hello' greeting field)
name is FreeMarker model attribute (set up as 'Felix')

This is usable only for simple SpEL expressions producing String output.

For details follow this post:
http://adaptiweb.blogspot.sk/2012/10/freemarker-template-with-spring.html




--
View this message in context: http://freemarker.624813.n4.nabble.com/Spring-MVC-3-with-SpEL-Tiles-and-Freemarker-tp4654186p4654346.html
Sent from the freemarker-user mailing list archive at Nabble.com.
MiB
2012-10-15 06:29:22 UTC
Permalink
Post by MiB
Freemarker
the template evaluation result is: We say 'Hello Felix' from Freemarker
@greetingBean is standard Spring bean (contains 'Hello' greeting field)
name is FreeMarker model attribute (set up as 'Felix')
This is usable only for simple SpEL expressions producing String output.
http://adaptiweb.blogspot.sk/2012/10/freemarker-template-with-spring.html
I'll check this out for my next project. Thank you.

Loading...