How to display the jsp page on popup window in liferay?




<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>

<portlet:defineObjects />
<portlet:renderURL var="portletSettingsURL" windowState="<%=LiferayWindowState.POP_UP.toString()%>">
      <portlet:param name="jspPage" value="/html/jsppop/jpop.jsp"/>
 </portlet:renderURL>

 <a href="#" onClick="openConfigPopup()">jsp url</a>

 <script type="text/javascript">
    function openConfigPopup()
    {
        AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
            var dialog = new A.Dialog({
                    title: 'Configuration',
                    centered: true,
                    draggable: true,
                    modal: true,
                    width: 200,
                   height: 200,
                }).plug(A.Plugin.IO, {uri: '<%=portletSettingsURL%>'}).render();
            dialog.show();
        });
  }
</script>


How to get current url from the theme ?

<%@ taglib uri="http://liferay.com/tld/theme" prefix="theme" %>
<theme:defineObjects/>
 <%=PortalUtil.getLayoutURL(themeDisplay.getLayout(),themeDisplay) %>



Search This Blog

All the rights are reserved to this blog is belongs to me only.. Powered by Blogger.