Foros de discusión
Duplicate content on aui popup
sanket jani, modificado hace 9 años.
Duplicate content on aui popup
New Member Mensajes: 21 Fecha de incorporación: 19/08/14 Mensajes recientes
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>
Archivos adjuntos:
Mayur Patel, modificado hace 9 años.
RE: Duplicate content on aui popup
Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
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 hace 9 años.
RE: Duplicate content on aui popup
New Member Mensajes: 21 Fecha de incorporación: 19/08/14 Mensajes recientes
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 hace 9 años.
RE: Duplicate content on aui popup
Regular Member Mensajes: 152 Fecha de incorporación: 29/07/14 Mensajes recientes
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 hace 9 años.
RE: Duplicate content on aui popup
New Member Mensajes: 21 Fecha de incorporación: 19/08/14 Mensajes recientes
Thanks for replying
krishna mohan mathakala, modificado hace 7 años.
RE: Duplicate content on aui popup
Junior Member Mensajes: 68 Fecha de incorporación: 8/09/12 Mensajes recientes
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();