Re: freeMarker support java code ????

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
It doesn't support java code. It can call the public methods of the
object that were put into the data-model (if you have are using a such
ObjectWrapper). The "JForumContext" is a variable name, not really a
class name.


Tuesday, November 23, 2010, 6:42:29 AM, yang Yang wrote:

> Hi:
> I wonder if the freemarker support java code in the template?
>
> Since I saw some codes at:
>
> https://github.com/jforum/jforum2/blob/master/templates/default/post_show.htm :line 48
>
> src="${JForumContext.encodeURL("/js/list/moderation")}"
>
> The JForumContext is a java class, and the encodeURL is a method of JForumContext.
>
> I really can not understand why does freemarker support this 
> manner, it aim to separate the view and model,when I am working with
> the html/xml or other presention page, I do not care the model,so if
> it support java code,what is the difference between it and jsp? ???
-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.