Foren
DDL Display templates and missing serviceLocator
Armaz Mellati, geändert vor 7 Jahren.
DDL Display templates and missing serviceLocator
Junior Member Beiträge: 96 Beitrittsdatum: 30.10.09 Neueste Beiträge
Hi
I am trying to make a Display Template for my Dynamic data list.
I am following the documentation :
https://dev.liferay.com/discover/portal/-/knowledge_base/6-2/make-it-pretty-creating-custom-displays
However I get this Error :
Which is referring to this line, directly copied from the documentation :
What am I missing ? I wonder why would I need to use a serviceLocator at all ? Why couldn´t the "records" variable be pre-defined ?
I am missing something here ?
Thanx in advance.
I am trying to make a Display Template for my Dynamic data list.
I am following the documentation :
https://dev.liferay.com/discover/portal/-/knowledge_base/6-2/make-it-pretty-creating-custom-displays
However I get this Error :
Expression serviceLocator is undefined on line 12
Which is referring to this line, directly copied from the documentation :
<#assign DDLRecordLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService")>
<#assign records = DDLRecordLocalService.getRecords(reserved_record_set_id)>
What am I missing ? I wonder why would I need to use a serviceLocator at all ? Why couldn´t the "records" variable be pre-defined ?
I am missing something here ?
Thanx in advance.