Open portlet from other portlet

前端 未结 1 864
甜味超标
甜味超标 2020-12-22 07:43

Is it possible to open pop up window from one portlet, that contains some other portlet ?

 

        
1条回答
  •  离开以前
    2020-12-22 08:19

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

    0 讨论(0)
提交回复
热议问题