Freemarker and CDI @Named

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Freemarker and CDI @Named

Ivo Sestren Junior
Hi,

I have a class with @Named("title")
And in template i have:  <title>${title.getTitle()}</title>


But this is not working, his showing variable title its null.

But my class its never calling.

How i use CDI @Named in Freemarker?

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|

Re: Freemarker and CDI @Named

bredelet
Did you add a ‎title object in your data model?

-- Denis.

Hi,

I have a class with @Named("title")
And in template i have:  <title>${title.getTitle()}</title>


But this is not working, his showing variable title its null.

But my class its never calling.

How i use CDI @Named in Freemarker?


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|

Re: Freemarker and CDI @Named

Daniel Dekany
In reply to this post by Ivo Sestren Junior
This must some misunderstanding. FreeMarker itself doesn't care about
CDI or @Named, it never did. It only sees the variables that are
present in the data-model object that's passed to
Template.process(dataModel, writer). What's you data model?


Tuesday, May 19, 2015, 4:35:53 PM, Ivo Sestren Junior wrote:

> Hi,
>
> I have a class with @Named("title")
> And in template i have:  <title>${title.getTitle()}</title>
>
>
> But this is not working, his showing variable title its null.
>
> But my class its never calling.
>
> How i use CDI @Named in Freemarker?

--
Thanks,
 Daniel Dekany


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user