掲示板

How to create a liferay Popup on click of Button

10年前 に Kushnoor Pathan によって更新されました。

How to create a liferay Popup on click of Button

New Member 投稿: 19 参加年月日: 14/02/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
10年前 に meera prince によって更新されました。

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

Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
10年前 に Kushnoor Pathan によって更新されました。

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

New Member 投稿: 19 参加年月日: 14/02/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
10年前 に Ondřej Životský によって更新されました。

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

Junior Member 投稿: 29 参加年月日: 11/03/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
10年前 に Kushnoor Pathan によって更新されました。

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

New Member 投稿: 19 参加年月日: 14/02/23 最新の投稿
Hi, My Liferay Version is 6.2.0
thumbnail
10年前 に meera prince によって更新されました。

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

Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
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
10年前 に Kushnoor Pathan によって更新されました。

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

New Member 投稿: 19 参加年月日: 14/02/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
10年前 に meera prince によって更新されました。

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

Liferay Legend 投稿: 1111 参加年月日: 11/02/08 最新の投稿
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
9年前 に asif aftab によって更新されました。

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

Regular Member 投稿: 123 参加年月日: 13/09/02 最新の投稿