Foren

Click on Action->Liferay Pop up

Ranen Das, geändert vor 11 Jahren.

Click on Action->Liferay Pop up

Regular Member Beiträge: 137 Beitrittsdatum: 06.04.11 Neueste Beiträge
Hello,

I want to implement a pop up portlet, here is my requirement, I have Action Menu in every row in one of my portlet(portlet has got data in table format), now when I click a button in the Action Menu(say, Edit) there will be a pop up with that row's data, how can I implement that, is there any example/blog available, if yes plz post here.

Regards,
RD
thumbnail
manasa chandri, geändert vor 11 Jahren.

RE: Click on Action->Liferay Pop up

Regular Member Beiträge: 152 Beitrittsdatum: 28.09.10 Neueste Beiträge
Hi,

Paste the below code in your jsp page(search container )
<liferay-ui:icon-menu>
<li><a href="javascript:showPopup()">
<img class="icon" src="<%= themeDisplay.getPathThemeImages() + "/common/edit.png" %>" />
popup
</a></li>
</liferay-ui:icon-menu>

src -- is the image path

call your javascript showPopup function

popupurl : create the popup page url

<script language="JavaScript" type="text/javascript">
function showPopup() {

var url = '<%= popupurl.toString() %>';


AUI().use('aui-dialog', 'aui-io', 'event-custom', 'io-form', function(A) {

var dialog = new A.Dialog({
title: 'pop-up',
centered: true,
draggable: true,
width: 900,
height: 500,
modal: true

}).plug(A.Plugin.IO, {uri: url}).render();


dialog.show();
});


}
</script>


Regards,
Manasa.
Ranen Das, geändert vor 11 Jahren.

RE: Click on Action->Liferay Pop up

Regular Member Beiträge: 137 Beitrittsdatum: 06.04.11 Neueste Beiträge
Here is the solution, hope it will help someone