如何修复无响应的 ext.list?
我遇到了 Ext.List 的问题:
您按下主菜单上的按钮,就会显示列表。其上的所有内容都运行良好,您可以选择在应用程序中深入了解的位置。到目前为止没有问题。 但是,如果您随后按“后退”按钮返回主菜单并重新进入显示此 Ext.List 的页面,则它不再起作用:您无法选择列表中的条目。
如果您通过以下方式返回主菜单,“后退”按钮将删除列表:
setTimeout(function(){page.removeAll();},100);
我的错误是什么?您是否知道比“page.removeAll()”更好的方法,它确实杀死了这个 Ext.List,以便当我选择在主菜单中查看它时完全重新创建它?
预先感谢,你们有最好的提示和技巧。
I've got a problem with an Ext.List:
You press a button on the main menu and are shown the list. Everything on it works fine and it let's you choose, where to go deeper inside the app. No problems so far.
But if you then go back to the main menu by pressing a "back"-button and reenter the page, that shows this Ext.List, it doesn't work anymore: you can't select an entry of the list.
The "back"-button removes the list, if you return to the main menu this way:
setTimeout(function(){page.removeAll();},100);
What's my mistake? Do you know a better method than "page.removeAll()" that really kills this Ext.List to let it then be completely recreated when I choose to see it in my main menu?
Thanks in advance, you guys have the best tips and tricks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有看到你的代码,很难判断,但我怀疑你描述的程序流程中的某个地方存在 javascript 错误。如果您在 Chrome 或 Firefox 中显示 javascript 控制台,它应该会显示错误。
根据创建列表的函数的定义方式,它通常会在页面/函数输入时重新创建列表,并且不需要显式“杀死”列表。
It's hard to tell without seeing your code but I suspect that there is a javascript error somewhere in the program flow that you described. If you display the javascript console in either Chrome or Firefox it should show the error.
Depending upon how the function that creates the list is defined it would normally recreate the list upon page/function entry and there should be no need to 'kill' the list explicitly.