Foros de discusión

How to create a liferay Popup on click of Button

Kushnoor Pathan, modificado hace 10 años.

How to create a liferay Popup on click of Button

New Member Mensajes: 19 Fecha de incorporación: 23/02/14 Mensajes recientes
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, modificado hace 10 años.

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

Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
Kushnoor Pathan, modificado hace 10 años.

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

New Member Mensajes: 19 Fecha de incorporación: 23/02/14 Mensajes recientes
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ý, modificado hace 10 años.

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

Junior Member Mensajes: 29 Fecha de incorporación: 11/03/11 Mensajes recientes
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, modificado hace 10 años.

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

New Member Mensajes: 19 Fecha de incorporación: 23/02/14 Mensajes recientes
Hi, My Liferay Version is 6.2.0
thumbnail
meera prince, modificado hace 10 años.

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

Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
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, modificado hace 10 años.

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

New Member Mensajes: 19 Fecha de incorporación: 23/02/14 Mensajes recientes
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, modificado hace 10 años.

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

Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
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, modificado hace 9 años.

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

Regular Member Mensajes: 123 Fecha de incorporación: 2/09/13 Mensajes recientes