I have modal dialog in Liferay 6.2 Is there any way to set destoryOnHide or destroyOnClose to dialog, but after render process?
可以将文章内容翻译成中文,广告屏蔽插件会导致该功能失效:
问题:
回答1:
If you have a reference to the Dialog object, you can use the set Operation. For example:
var dlg = Liferay.Util.Window.getWindow({ id: 'd123', ..your-config-obj.. });
// now it is rendered
dlg.set('destroyOnHide', false);
Unfortunatelly, i did not see a similar thing for destroyOnClose, but you can try to do this in same way. If you dont have a reference to the dialog, you can get one with (for Example)
Liferay.Util.Window.getById('d123');
Also make sure you have a dependency to 'liferay-util-window' in your script.