【发布时间】:2013-10-15 21:54:13
【问题描述】:
在 GWT Celltable 中编辑 EditTextCell 时默认选择文本框值,如何删除此默认选择?
您也可以查看 EditText 的这个 celltable 展示,
http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellSampler
【问题讨论】:
在 GWT Celltable 中编辑 EditTextCell 时默认选择文本框值,如何删除此默认选择?
您也可以查看 EditText 的这个 celltable 展示,
http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellSampler
【问题讨论】:
当你点击EditTextCell时,它会调用edit方法来聚焦并选择内容:
见here
protected void edit(Context context, Element parent, String value) {
setValue(context, parent, value);
InputElement input = getInputElement(parent);
input.focus();
input.select(); /* HERE */
}
也许您可以创建一个扩展EditTextCell 的自定义类,在没有最后一行的情况下覆盖此方法...
【讨论】: