Liferay 7 CE-Osgi模块(Liferay MVC Portlet)无法加载javascript文件

lan*_*s86 1 javascript osgi portlet liferay-7

我创建了一个新的liferay osgi模块。我的控制器具有以下标签:

@Component(
immediate = true,
property = {
    "com.liferay.portlet.display-category=Bla Modules",
    "com.liferay.portlet.instanceable=true",
    "javax.portlet.display-name=EventCalendar",
    "javax.portlet.init-param.template-path=/",
    "javax.portlet.expiration-cache=0",
    "com.liferay.portlet.footer-portlet-javascript=fullcalendar_year.js,/js/custom/main.js",
    "com.liferay.portlet.header-portlet-css=/css/fullcalendar_year.css,/css/fullcalendar.css",
    "javax.portlet.init-param.view-template=/view.jsp",
    "javax.portlet.resource-bundle=content.Language",
    "javax.portlet.security-role-ref=administrator,power-user,user"
},
service = Portlet.class
Run Code Online (Sandbox Code Playgroud)

但是财产

com.liferay.portlet.footer-portlet-javascript

不加载所有js文件,仅在调用一个文件的情况下才加载文件,如果不止一个,则不加载任何文件。

这是一个错误还是我做错了什么?

lan*_*s86 5

终于我找到了解决方案。必须在单独的行中声明。

property = {
    "com.liferay.portlet.display-category=XXXXAA Modules",
    "com.liferay.portlet.instanceable=true",
    "javax.portlet.display-name=XXXXAA",
    "javax.portlet.init-param.template-path=/",
    "javax.portlet.expiration-cache=0",
    "com.liferay.portlet.footer-portlet-javascript=/js/moment.min.js",
    "com.liferay.portlet.footer-portlet-javascript=/js/fullcalendar_year.js",
    "com.liferay.portlet.footer-portlet-javascript=/js/calendarLanguages/pt.js",
    "com.liferay.portlet.footer-portlet-javascript=/js/custom/main.js",
    "com.liferay.portlet.header-portlet-css=/css/fullcalendar_year.css,/css/fullcalendar.css",
    "javax.portlet.init-param.view-template=/view.jsp",
    "javax.portlet.resource-bundle=content.Language",
    "javax.portlet.security-role-ref=administrator,power-user,user"
}
Run Code Online (Sandbox Code Playgroud)