2

I want to open new dialog on liferay search container..How is it possible. I create search container

<liferay-ui:search-container delta="37"> <liferay-ui:search-container-results results="<%=Clip%>" total="<%=Clip.size()%>"> </liferay-ui:search-container-results>

<liferay-ui:search-container-row className="com.Clipping" keyProperty="ClippingId" modelVar="item">

<liferay-ui:search-container-column-text name="Type" value="<%=item.getType()%>" /> <liferay-ui:search-container-column-text name="Paper" value="<%=item.getNewsPaper()%>" />

<liferay-ui:search-container-column-text name="Category" value="<%=item.getCategory()%>" />



<liferay-ui:search-container-column-text name="Sub Category" value="<%=item.getSubCategory()%>" />


<liferay-ui:search-container-column-jsp path="/html/view2.jsp" name="View"/>



</liferay-ui:search-container-row>

<liferay-ui:search-iterator /> </liferay-ui:search-container>

Here i created one search container which includes few columns and also one column with view link. When i click on view link at that time i want to open new dialog. How is it possible??please help me

Thanks

user3855589
  • 1,113
  • 2
  • 15
  • 43

1 Answers1

2

Try something like this, i can't be more accurate because your question is too generic. So I assume that you want to show a portlet in the dialog.

In your view2.jsp:

<%@ include file="/init.jsp" %> //if you are using the standard pattern portlet development, otherwise import what you need, but be sure to import the taglibs that i use below

<liferay-portlet:renderURL
    var="popupURL"
    portletName="yourPortletID"
    windowState="<%=LiferayWindowState.POP_UP.toString() %>">
    <liferay-portlet:param name="param1" value="value1" />    
</liferay-portlet:renderURL>

<%
popupURL="javascript:showPopup('"+popupURL+"','My Title')";
%>

<button onclick="<%=popupURL %>">Button</button>

<aui:script>
function showPopup(url, title)
{
    Liferay.Util.openWindow(
            {
                dialog: {
                    cache: false,
                    width:500,
                    centered: true,                 
                    resizable: false,
                    title: title,
                    modal: true
                },
                id: 'myId',             
                uri: url
            }
    );    
}
</aui:script>

There are many thing to know about dialog, so i advice you to read more about it, this example is only for open a dialog in a easy way.

Marco Mercuri
  • 1,117
  • 9
  • 17