1
我正在嘗試在Liferay中的期刊文章的velocity模板中使用serviceLocator。Liferay,在Journal article velocity模板中使用serviceLocator
journal.template.velocity.restricted.variables=
然後我重新啓動服務器
在我的虛擬機文件我有:
#set ($countryService = $serviceLocator.findService("com.liferay.portal.service.CountryService"))
#set ($countryList = $countryService.getCountries())
#foreach ($country in $countryList)
$country.getName()
#end
這在文章中顯示任何 我加入行修改portal-ext.properties文件並且在服務器上也沒有錯誤。我也檢查了數據庫和國家在那裏,如果我在我的portlets服務中使用getCountries()方法,它會返回國家,因爲它應該。
有沒有人有類似的問題?