在 ALLOY DIALOG 中渲染 JSP

发布于 2024-09-28 05:46:13 字数 470 浏览 2 评论 0原文

我在 Liferay 6.0.5 中使用 ALLOY DIALOG,如下所示:

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

    });

}

我进入弹出窗口“testing”。但我想转发到一个 jsp 文件,而不是“bodycontent”,我在其中编写了一些逻辑。怎么做呢?

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 written some logic. How to do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

左岸枫 2024-10-05 05:46:13

您必须“插入”另一个模块才能向 a.Dialog 提供所需的文章。
尝试一些这样的:

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

});

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

});
孤芳又自赏 2024-10-05 05:46:13

我知道现在回答这个问题已经太晚了,但这是解决方案。

<%

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>

这将在弹出窗口中打开给定的 jsp 页面。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文