留言板

A.Dialog is not a constructor

Giacomo Castellini,修改在9 年前。

A.Dialog is not a constructor

New Member 帖子: 21 加入日期: 14-6-26 最近的帖子
Hi,
I have the following piece of code and I get TypeError: A.Dialog is not a constructor.
What's wrong? I am using Liferay 6.2
Thanks for the answer


<script type="text/javascript">
function openPopup()
{
AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
var dialog = new A.Dialog({
title: '${popupTitle}',
centered: true,
draggable: true,
modal: true,
width: 400,
height: 200,
}).plug(A.Plugin.IO, {uri: '<%=url%>'}).render();

dialog.show();
});
}
</script>
thumbnail
Kyle Joseph Stiemann,修改在9 年前。

RE: A.Dialog is not a constructor

Liferay Master 帖子: 760 加入日期: 13-1-14 最近的帖子
Hi Giacomo,
Dialog is an AlloyUI 1.5 component. Since Liferay 6.2 uses AlloyUI 2.0, Dialog will not work in Liferay 6.2. Instead you will need to use the AlloyUI 2.0 Modal component.

- Kyle
Giacomo Castellini,修改在9 年前。

RE: A.Dialog is not a constructor

New Member 帖子: 21 加入日期: 14-6-26 最近的帖子
Thanks a lot Kyle