Foren

How to create a liferay Popup on click of Button

Kushnoor Pathan, geändert vor 10 Jahren.

How to create a liferay Popup on click of Button

New Member Beiträge: 19 Beitrittsdatum: 23.02.14 Neueste Beiträge
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, geändert vor 10 Jahren.

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

Liferay Legend Beiträge: 1111 Beitrittsdatum: 08.02.11 Neueste Beiträge
Kushnoor Pathan, geändert vor 10 Jahren.

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

New Member Beiträge: 19 Beitrittsdatum: 23.02.14 Neueste Beiträge
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ý, geändert vor 10 Jahren.

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

Junior Member Beiträge: 29 Beitrittsdatum: 11.03.11 Neueste Beiträge
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, geändert vor 10 Jahren.

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

New Member Beiträge: 19 Beitrittsdatum: 23.02.14 Neueste Beiträge
Hi, My Liferay Version is 6.2.0
thumbnail
meera prince, geändert vor 10 Jahren.

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

Liferay Legend Beiträge: 1111 Beitrittsdatum: 08.02.11 Neueste Beiträge
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, geändert vor 10 Jahren.

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

New Member Beiträge: 19 Beitrittsdatum: 23.02.14 Neueste Beiträge
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, geändert vor 10 Jahren.

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

Liferay Legend Beiträge: 1111 Beitrittsdatum: 08.02.11 Neueste Beiträge
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, geändert vor 9 Jahren.

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

Regular Member Beiträge: 123 Beitrittsdatum: 02.09.13 Neueste Beiträge