I am trying show a portlet (that previously I have created) from another one, but the pop-up is empty.
First, I create the renderURL:
<liferay-portlet:renderURL var="testPopupURL" portletName="<%=rule.getBannerPortletId() %>" windowState="<%=LiferayWindowState.POP_UP.toString() %>"></liferay-portlet:renderURL>
and I do the link:
<aui:a href="#" onClick="showPopup('${testPopupURL}')">View</aui:a>
and this is the function showPopup:
function showPopup(url){
console.log("En el showPopup ");
AUI().ready('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
window.myDialog = new A.Dialog({
title: 'Banner',
width: 640,
centered: true
}).plug(A.Plugin.DialogIframe, {
uri: url.toString(),
iframeCssClass: 'dialog-iframe'
}).render();
});
}
I put in the liferay-portlet.xml (of the portlet I want open in the pop-up) this:
<add-default-resource>true</add-default-resource>
The portlet is instanciable and the bannerPortletId is the porletId.
Any idea?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…