留言板
A.Dialog is not a constructor
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>
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>
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
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