Rendering JSP in ALLOY DIALOG
I am using ALLOY DIALOG in Liferay 6.0.5 as follows:
function countPopup(){
AUI().use('aui-dialog', 'liferay-portlet-url', function(A) {
var dialog = new A.Dialog({
title: 'Upload Details',
centered: true,
modal: true,
width: 500,
height: 400,
bodyContent:"testing",
}).render();
});
}
I am getting in popup " testing ". But Instead of "bodycontent" I want to forward to one jsp file where i have writ开发者_Go百科ten some logic. How to do that?
You must "plug" another module to feed a.Dialog with article desired. Try some like this:
AUI().use('aui-dialog', 'aui-io', function(A) {
var dialog = new A.Dialog({
title: 'Upload Details',
centered: true,
modal: true,
width: 500,
height: 400,
}).plug(A.Plugin.IO, {uri: 'your_url.html'}).render();
});
I know this is too much late to give answer to this question but here is the solution.
<%
User selUser = (User)request.getAttribute("user.selUser");
PortletURL popupURL = renderResponse.createRenderURL();
popupURL.setWindowState(LiferayWindowState.POP_UP);
popupURL.setParameter("jspPage","Your jsp page path here");
String popup = "javascript:xyzPopUp('"+ popupURL.toString() + "');";%>
<aui:script>
Liferay.provide(
window,
'xyzPopUp',
function(url) {
var A = AUI();
var portletURL="<%=themeDisplay.getURLManageSiteMemberships().toString()%>";
var dialog = new A.Dialog(
{
modal: true,
centered: true,
destroyOnClose: true,
draggable: true,
height: 150,
resizable: false,
title: 'your title here',
width: 200
}
).plug(
A.Plugin.IO,
{
uri:url
}
).render();
},
['aui-dialog']
);
</aui:script>
This will open the given jsp page in to popup.
精彩评论