问题
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