What's the difference between GWT's EditTextCell and TextInputCell?
Both cells seem to render an <input type="text"...></input>
. How do they differ? What are t开发者_开发知识库heir respective uses?
EditTextCell is a special cell that can be used to edit a text. By default the cell is in normal mode and the text is displayed as non-editable html. On click the cell changes to edit mode and the text is displayed in an input. The user can edit the text inside the input.
If in edit mode a ENTER changes back to normal mode and fires any ValueUpdater. If in edit mode a ESC changes back to normal mode without firing any ValueUpdater.
On the other hand TextInputCell is a cell that ALWAYS displays the text in an input element.
To see both cells is action (columns 3 & 4): http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellSampler
In EditTextCell
you can press Escape to cancel edits.
精彩评论