0
votes

Is it possible to open pop up window from one portlet, that contains some other 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>
1

1 Answers

1
votes

yes you can.

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();
    });
}

You can check below link for more deatails Display portlet in pop-up Liferay

The idea is, create a URL of portlet which you want to invoke in popup and set window state to LiferayWindowState.POP_UP.toString()

update:

 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();

          });