I load the WebContent edit portlet on a Popup window using the following code:
<liferay-ui:icon
image="edit"
label="true"
message="news-edit-url"
url="${oneNews.newsEditUrl}"
/>
editUrl:
taglibEditURL = "javascript:Liferay.Util.openWindow({dialog: {width: 960}," +
"id: '" + renderResponse.getNamespace() + "'," +
"title: '" + LanguageUtil.format(request.getLocale(), "edit-x", HtmlUtil.escape(assetRenderer.getTitle(request.getLocale()))) + "'," +
"uri:'" + HtmlUtil.escapeURL(editPortletURLString) + "'});";
When the content is saved or published, the portlet is loaded on the popup window. I want the popup window to close and the portlet with the editURL link to refresh.
Any help regarding this...
AUI taglib solution for 6.2 version. No additional JS required.
Important part is
cssClass="close-panel"
.Here is the code to close the pop-up, this should be present in the parent page which opens the pop-up:
Liferay version 6.1
Liferay version 6.2
Here is the code to refresh the portlet which opened the pop-up. This should be present in the parent page which opens the pop-up:
It is up to you how to call the
closePopup
&refreshPortlet
functions. One way is you can let the pop-up refresh and call theclosePopup
function from the pop-up itself only when the request is successfully processed and then call therefreshPortlet
function also from the pop-up.Here is a code-snippet which would help you to call parent-page functions from the pop-up:
The
popupIdToClose
is the sameid
which is used when opening the pop-up as shown:Hope this helps.