我已经阅读了这篇文章以及另一篇 webapplicationdeveloper 博客文章,但没有找到任何将自定义应用模板中的操作按钮获取到动态数据列表的想法。
我也尝试在 vm 模板中包含 dynamicdatalist portlet 的默认 record_action.jsp 但它不起作用并且还设置了下面的属性
journal.template.velocity.restricted.variables =
在portal-ext 属性中,但我仍然没有在我的自定义模板中获得操作按钮
我已经尝试过了:
#
set (
$categoriesService = $portal.getClass().forName("com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil").getMethod("getService", null).invoke(null, null))
My answer is: Yessss, it works. But I want use a jstl lib (e.g. <aui> or <ui>) as well. In my opinion the simpliest way to do it is include jsp file to themeServletContext. Put your file.jsp into your theme:
your-theme/docroot/path/to/your/jsp/file.jsp
and paste this piece of code into your vm (for example portal_normal.vm):
$theme.include($themeServletContext, "/path/to/your/jsp/file.jsp")
在这种情况下,它无法找到我的页面显示$theme的 $theme 变量...:(请帮助: