Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ranen Das
Click on Action->Liferay Pop up
June 18, 2012 10:59 AM
Answer

Ranen Das

Rank: Regular Member

Posts: 137

Join Date: April 6, 2011

Recent Posts

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
manasa chandri
RE: Click on Action->Liferay Pop up
June 19, 2012 5:39 AM
Answer

manasa chandri

Rank: Regular Member

Posts: 145

Join Date: September 27, 2010

Recent Posts

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
RE: Click on Action->Liferay Pop up
June 21, 2012 11:05 AM
Answer

Ranen Das

Rank: Regular Member

Posts: 137

Join Date: April 6, 2011

Recent Posts

Here is the solution, hope it will help someone
Attachments: PopupMVC-portlet.war (682.6k)