在做项目中,发现如果点击按钮弹出一个窗口可以,但是我再点击该按钮想弹出该窗口,却发现显示不出来。。。。
不知道是什么问题......经过调查发现:
是window的一个属性的问题,英文属性解释如下:
The action to take when the close header tool is clicked:
-
'destroy'
:remove the window from the DOM anddestroy it and all descendant Components. The window will not be available to be redisplayed via theshow method.
-
'hide'
:hide the window by setting visibility to hidden and applying negative offsets. The window will be available to be redisplayed via the show method.
Note: This behavior has changed! setting does affect theclose method which will invoke the approriate closeAction.
翻译:
closeAction属性可以设置两个值,一个是'hide',一个是‘destroy’,
destroy: 从页面dom中移除窗口并销毁它和其所有的子控件。这个窗口将不可能通过窗口显示方法重新显示出来
hide: 通过设置可见性为隐藏来隐藏窗口,并且使其功能失效。这个窗口将可以通过窗口显示方法重新显示出来
所以我的问题就是将closeAction设置为‘hide’ 就可以了
分享window
http://www.cnblogs.com/wangjunwei/archive/2013/02/12/2910286.html