How to set “destoryOnHide” or “destroyOnClose” to modal dialog which is existing, in Liferay?

问题: 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 Dia...

问题:

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.

  • 发表于 2018-07-13 11:56
  • 阅读 ( 537 )
  • 分类:sof

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除