javascript - 如何在Liferay中制作弹出窗口?

标签 javascript liferay

如何在Liferay中制作弹出窗口? 这是我的代码。就像 Liferay Wiki 中的一样。

var popup = new Liferay.Popup( { 
  header: 'our title', 
  position:[150,150], 
  modal:true, width:500, 
  height:300, 
  xy: ['center', 100], 
  url: '/my_file.jsp', 
  urlData: { winowState : 'LiferayWindowState.EXCLUSIVE'} 
} );

缺少什么?

PS:我正在尝试让它在 Liferay 6.0 中工作

最佳答案

除了 sandeepnair85 的答案之外,要在 URI 内容中使用 AJAX,您还必须添加以下代码:

<aui:script use="aui-dialog">
    function showPopup(){
        var dialog = new A.Dialog({
            title: 'DISPLAY CONTENT',
            centered: true,
            modal: true,
            width: 200,
            height: 200
        }).plug(A.Plugin.IO, {
            uri: 'http://myurl.com'
        }).render();
    }
</aui:script>

有关 A.Plugin.IO 插件如何工作的更多详细信息,请参见此处: http://alloy.liferay.com/deploy/api/A.Plugin.IO.html

关于javascript - 如何在Liferay中制作弹出窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7725343/

相关文章:

java - Liferay 7 和 Vaadin 8 : Vaadin Shared is not active

javascript - Rails 搜索栏不工作

javascript - 写入kml文件: How send kml string to kml file?

javascript - 重置子元素的不透明度 - Maple Browser (Samsung TV App)

c# - 如何从中继器控件检索详细信息以在模式弹出窗口中显示

从前端角度看LIferay?

portlet - 将简单的 Portlet 部署到 Liferay - ClassCastException

php - Jquery Post +运行php文件>隐藏表单>给出消息

oracle - liferay可以使用公共(public)同义词读取模式吗