문제

I've been all over the Liferay sites and haven't found an answer that works. What I want to do is have a JavaScript function inside my custom portlet that will open an AUI dialog box, and that dialog box shows the view.jsp contents from an entirely separate portlet.

Here's what I've got so far:

AUI().ready('aui-dialog','aui-dialog-iframe','liferay-portlet-url', function(A) {
        var url = Liferay.PortletURL.createResourceURL();
        url.setPortletId("my_portlet_that_I_want_in_a_dialog");
        url.setWindowState('pop_up'); 

    #foreach ($parameter IN $parameters.getSiblings())
        url.setParameter("${parameter.data}", "${parameter.value.data}");
    #end  


    window.myDialog = new A.Dialog(
        {
            title: 'My Dialog',
            width: 640,
            centered: true
        }
    ).plug(
        A.Plugin.DialogIframe,
        {
            uri: url.toString(),
            iframeCssClass: 'dialog-iframe'
        }
    )
});

Then, in a completely different portlet, I've got a JavaScript function that calls:

window.myDialog.render()

This much works. However, when the dialog appears, it's always blank or infinitely shows a "Loading" animation.

Possibly related: In the Firebug console, I'm seeing

"yui: NOT loaded: delayed-task"

Not sure if that's related to the current problem or not. Thanks for the help.

EDIT: If I log the URL variable to the console, then copy and paste the URL into a new tab, the response is completely blank. This leads me to believe that I'm either not generating the URL correctly or there is some kind of inter-portlet permissions issue going on here.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top