留言板

How to create a liferay Popup on click of Button

Kushnoor Pathan,修改在10 年前。

How to create a liferay Popup on click of Button

New Member 帖子: 19 加入日期: 14-2-23 最近的帖子
Hi,
I have to create a Liferay popup on click of a button.popup should open a jsp page. like the same way how the calender portlet will open a Popup on Click of a Add Event Button. I have tried with the below code from one of the forums.but this gives me a error by saying that A.Dialog is not a constructor.


<portlet:renderURL var="somePageURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
<portlet:param name="jspPage" value="/jsp/some/page.jsp"/>
<portlet:param name="redirect" value="<%= currentURL %>"/>
</portlet:renderURL>

<script type="text/javascript">
function showPopup() {
AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {

var dialog = new A.Dialog({
title: 'Popup Title',
centered: true,
draggable: true,
modal: true
}).plug(A.Plugin.IO, {uri: '<%= somePageURL %>'}).render();

dialog.show();

});
}
thumbnail
meera prince,修改在10 年前。

RE: How to create a liferay Popup on click of Button

Liferay Legend 帖子: 1111 加入日期: 11-2-8 最近的帖子
Kushnoor Pathan,修改在10 年前。

RE: How to create a liferay Popup on click of Button

New Member 帖子: 19 加入日期: 14-2-23 最近的帖子
Hi,
Thanks for the response.But I have tried from those links aswell.But in firebug its giving me error by saying that A.Dialog is not a Constructor.
thumbnail
Ondřej Životský,修改在10 年前。

RE: How to create a liferay Popup on click of Button

Junior Member 帖子: 29 加入日期: 11-3-11 最近的帖子
Kushnoor Pathan:
Hi,
Thanks for the response.But I have tried from those links aswell.But in firebug its giving me error by saying that A.Dialog is not a Constructor.

Are there more JS errors on the page (after load/refreesh)? Which Liferay version? Do you use JS minification / developer.properties?
Ondrej
Kushnoor Pathan,修改在10 年前。

RE: How to create a liferay Popup on click of Button

New Member 帖子: 19 加入日期: 14-2-23 最近的帖子
Hi, My Liferay Version is 6.2.0
thumbnail
meera prince,修改在10 年前。

RE: How to create a liferay Popup on click of Button

Liferay Legend 帖子: 1111 加入日期: 11-2-8 最近的帖子
Hi
All are working example i written in article and example portlets also there.

Please make sure your browser version and liferay version.

It should work if try my code which is in downloaded portlets

Do like this create another brand new portlet and try only AUI dialog example then see any new result

Regards,
Meera Prince
Kushnoor Pathan,修改在10 年前。

RE: How to create a liferay Popup on click of Button

New Member 帖子: 19 加入日期: 14-2-23 最近的帖子
Hi ,
I am not able to import the source project provided in those links.Its showing me invalid project location.This might be because of Version .I am having Liferay Plugin SDK version 6.2.0
thumbnail
meera prince,修改在10 年前。

RE: How to create a liferay Popup on click of Button

Liferay Legend 帖子: 1111 加入日期: 11-2-8 最近的帖子
Hi
Instead of import
You just create brand new portlet in you environment and simple copy the jsp files code and portlet action class code from my downloaded portlet to your brand new portlet.
Moreover its not big portlet like many files its very few files you can copy manually and test in your environment as for me this is best practice because this is simple a sample portlet.
Regards,
Meera Prince
asif aftab,修改在9 年前。

RE: How to create a liferay Popup on click of Button

Regular Member 帖子: 123 加入日期: 13-9-2 最近的帖子