Re: Calling static methods

"Zemian Deng" <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hello Taras,
Have you just try ${myBeanInstance.myStaticMethod()} ???

If you use default Configuration, any public methods that's is not
deemed to be "security risk" will be exported.

I recommend using your model as immutable data and not to use methods
as much as possible. You can always insert the result of your static
method into another name in your backend codes, and thus avoid calling
the method on the View side. Calling method MIGHT create possible side
affect, which shouldn't introduce on the view side. I think FM let you
do it just for the convenience and being flexible.

-Z

On Fri, Jun 27, 2008 at 4:49 PM, Taras Tielkes <[email protected]> wrote:
> Can I call static methods on a bean that's part of the model?
>
> The documentation isn't explicit here. However, it seems to work.
>
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
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.