Wednesday, 9 May 2012

Liferay Alloy UI Popup


<portlet:renderURL var="popUpURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
  <portlet:param name="viewJsp" value="/destination.jsp"/>
  <portlet:param name="userId" value="<%= String.valueOf(userId) %>"/>
  <portlet:param name="organizationId" value="<%= String.valueOf(session.getAttribute("organizationId")) %>"/>
   <portlet:param name="tabs3" value="<%=tabs3%>"/>  

</portlet:renderURL>      

<a onClick="javascript:showPopup('<%= popUpURL %>')" href="#"><liferay-ui:message key="link-to-open-popup" /></a>
       
<script type="text/javascript">
function showPopup(url) {
  AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
    var dialog = new A.Dialog({
            title: '<liferay-ui:message key="Title" />',
height:400,
width:400,
            centered: true,
            draggable: true,
            destroyOnClose: true,
            modal: true
        }).plug(A.Plugin.IO, {uri: url}).render();    
        dialog.show();    
  });
}
</script>

No comments:

Post a Comment