是否可以从一个包含其他portlet的portlet打开弹出窗口?
<portlet:renderURL var="kategorijaSelectorURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<portlet:param name="mvcPath" value="/html/kategorija/view.jsp" />
<portlet:param name="struts_action" value="/html/kategorija/view.jsp" />
<portlet:param name="tabs1" value="kategorije" />
<portlet:param name="redirect" value="<%=redirect1 %>" />
</portlet:renderURL>
答案 0 :(得分:1)
var url;
function createRenderURL(portletId) {
AUI().ready('liferay-portlet-url', function(A) {
var renderURL = Liferay.PortletURL.createRenderURL();
renderURL.setName("test");
renderURL.setWindowState("pop_up");
renderURL.setPortletId(portletId);
url = renderURL.toString();
});
}
您可以查看以下链接以获取更多deatails Display portlet in pop-up Liferay
想法是,创建一个要在弹出窗口中调用的portlet的URL,并将窗口状态设置为LiferayWindowState.POP_UP.toString()
<强>更新强>
AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
dialog = new A.Dialog({
title: 'Title',
centered: true,
draggable: true,
resizable: false,
width: '980px',
height: '700px',
modal: true,
destroyOnClose: true
}).plug(A.Plugin.IO, {uri: '<%=urUrl%>'}).render();
dialog.show();
});