Fórum
Duplicate content on aui popup
sanket jani, modificado 9 Anos atrás.
Duplicate content on aui popup
New Member Postagens: 21 Data de Entrada: 19/08/14 Postagens Recentes
hello friends ,
i am using liferay 6.2
i have problem with the liferay pop up
when i push view button popup is displaying but after closing it and reopen the popup than it display duplicate content on popup
following is my code
please help me to get this out ..
<aui:button name="viewDonationRecords" style="margin-left:12%;" id="viewDonationRecords" value="View Donation"> </aui:button>
<portlet:renderURL var="donationRecord" windowState="<%=LiferayWindowState.EXCLUSIVE.toString()%>">
<portlet:param name="jspPage" value="/jsp/donation_record_view.jsp"/>
<portlet:param name="identicationidkey" value="<%=identkeyStr %>"/>
</portlet:renderURL>
<aui:script>
AUI().use('aui-base','aui-io-plugin-deprecated','liferay-util-window',function(A) {
A.one('#<portlet:namespace/>viewDonationRecords').on('click', function(event){
var popUpWindow=Liferay.Util.Window.getWindow({
dialog: {
title: 'Devotee Donation Record',
centered: true,
constrain2view: true,
//cssClass: 'yourCSSclassName',
modal: true,
resizable: false,
width: 475,
cache:false
}
}).plug(
A.Plugin.IO,{
autoLoad: false
}).render();
popUpWindow.show();
popUpWindow.titleNode.html(" ");
popUpWindow.io.set('uri','<%=donationRecord %>');
popUpWindow.io.start();
});
});
</aui:script>
i am using liferay 6.2
i have problem with the liferay pop up
when i push view button popup is displaying but after closing it and reopen the popup than it display duplicate content on popup
following is my code
please help me to get this out ..
<aui:button name="viewDonationRecords" style="margin-left:12%;" id="viewDonationRecords" value="View Donation"> </aui:button>
<portlet:renderURL var="donationRecord" windowState="<%=LiferayWindowState.EXCLUSIVE.toString()%>">
<portlet:param name="jspPage" value="/jsp/donation_record_view.jsp"/>
<portlet:param name="identicationidkey" value="<%=identkeyStr %>"/>
</portlet:renderURL>
<aui:script>
AUI().use('aui-base','aui-io-plugin-deprecated','liferay-util-window',function(A) {
A.one('#<portlet:namespace/>viewDonationRecords').on('click', function(event){
var popUpWindow=Liferay.Util.Window.getWindow({
dialog: {
title: 'Devotee Donation Record',
centered: true,
constrain2view: true,
//cssClass: 'yourCSSclassName',
modal: true,
resizable: false,
width: 475,
cache:false
}
}).plug(
A.Plugin.IO,{
autoLoad: false
}).render();
popUpWindow.show();
popUpWindow.titleNode.html(" ");
popUpWindow.io.set('uri','<%=donationRecord %>');
popUpWindow.io.start();
});
});
</aui:script>
Mayur Patel, modificado 9 Anos atrás.
RE: Duplicate content on aui popup
Expert Postagens: 358 Data de Entrada: 17/11/10 Postagens Recentes
Hi Sanket,
Can you please try same code by removing below line,
popUpWindow.show();
Thanks.
Can you please try same code by removing below line,
popUpWindow.show();
Thanks.
sanket jani, modificado 9 Anos atrás.
RE: Duplicate content on aui popup
New Member Postagens: 21 Data de Entrada: 19/08/14 Postagens Recentes
Thanks for your reply
i have change the code and its working fine.
thanks
i have change the code and its working fine.
thanks
Miroslav Ligas, modificado 9 Anos atrás.
RE: Duplicate content on aui popup
Regular Member Postagens: 152 Data de Entrada: 29/07/14 Postagens Recentes
Your code runs an Ajax request on every opening of the window. This way you're getting duplicated tables. To confirm my assumption, just open and close the popup window without page refreshes.
You need to modify the code either to do the popUpWindow.io.start(); only once per page load or you need to get rid of the data when you closing the popup window.
You need to modify the code either to do the popUpWindow.io.start(); only once per page load or you need to get rid of the data when you closing the popup window.
sanket jani, modificado 9 Anos atrás.
RE: Duplicate content on aui popup
New Member Postagens: 21 Data de Entrada: 19/08/14 Postagens Recentes
Thanks for replying
krishna mohan mathakala, modificado 7 Anos atrás.
RE: Duplicate content on aui popup
Junior Member Postagens: 68 Data de Entrada: 08/09/12 Postagens Recentes
Hi Sanket,
If you use the following property i.e destroyOnClose:true, your problem should be resolved.
If you use the following property i.e destroyOnClose:true, your problem should be resolved.
var popUpWindow=Liferay.Util.Window.getWindow(
{
dialog: {
centered: true,
constrain2view: true,
modal: true,
resizable: false,
destroyOnClose:true,
destroyOnHide:true,
width:500,
height:450,
}
}
).plug(
A.Plugin.IO,
{
autoLoad: false
}).render();