How to call a Liferay calendar portlet from my own portlet

半腔热情 提交于 2019-12-12 03:48:53

问题


I have a requirement that i have to call the liferay calendar portlet from my portlet.Can anybody give me any idea that how it can be achieved? I am doing this to my view.jsp

<script src="http://localhost:8080/html/js/liferay/widget.js" type="text/javascript"></script>
<script type="text/javascript">
Liferay.Widget({ url: 'http://localhost:8080/widget/web/guest/interview-availibility/-/calendar'});
</script>

but it is not working .Please somebody help


回答1:


There are two options available for adding a portlet into another portlet.

Using liferay-portlet:runtime

<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<liferay-portlet:runtime name="8" instance="xxx" queryString="" />

OR

<liferay-portlet:runtime portletName="_1_WAR_calendarportlet_" />

Using liferay-ui:calendar

<liferay-ui:calendar day="" year="" month="" />

References:
runtime-portlet
liferay-ui



来源:https://stackoverflow.com/questions/31849978/how-to-call-a-liferay-calendar-portlet-from-my-own-portlet

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!