GXT NumberField 不可编辑
我正在使用 Gxt-2.2.0 和 GWT 2.0。并且 GXT Numberfileds 不可编辑。
对于可编辑的 NumberFields,我可以做什么?
下面的代码是没有希望的;
NumberField field = new NumberField();
field.setEditable(true);
I'm using Gxt-2.2.0 and GWT 2.0. And GXT Numberfileds is not editable.
What can I do for editable NumberFields?
Following code is hopeless;
NumberField field = new NumberField();
field.setEditable(true);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从 GXT 开发团队那里得到了答案。
简单的解决方案是将 Gxt-2.2.0 升级到 GXT-2.2.1。这次升级解决了这个问题。
来源
I take the answer from GXT Development Team.
The simple solution is upgrading Gxt-2.2.0 to GXT-2.2.1. This upgrade solved the problem.
Source
它是可编辑的,您的代码必须简单地工作,问题似乎与数字字段实现有关。
它只接受 0-9 之间的字符,似乎对于浏览器中的某些区域设置,它发送的是 0-9 以外的字符。你可以尝试其他浏览器(在我的例子中,它在 IE 中工作,而不是在 Firefox 中工作)
现在要解决你的问题,你必须通过调用来设置它接受的字符:
如果你不知道区域设置数字字符是什么,你可以在 NumberField 类中的此方法中进行调试(检查关键变量):
It's editable, your code must simply work, the problem seems with the number field implementation.
It accepts only characters from 0-9, seems for some locale setting in your browser, it's sending characters other than 0-9. you can try other browser (in my case it was working in IE and not in Firefox)
Now to solve your problem you have to set the characters it accepts by calling:
if you don't know what are the locale number characters, you can debug in this method in the NumberField class (inspect key variable):