Inserting text in a textfield at the current prompt.


My problem is I want to insert some text into a text field. First implementation was based on getCursorPosition(), updating the text and calling setValue() on the text field. This works fine on Firefox, but IE7 - iE9 fail to work. The cursorposition is either -1 or 0, so not the actual position in both cases.

I’ve been trying to figure out the correct cursorposition using e.g. FocusListeners and TextChangeListeners, alas to no avail.

I’ve found
this message
on the forum, which is quite outdated, my questions:

  • Is this somehow solved in Vaadin already?
  • If not, is there code available implementing this feature?
  • If not, I’m not really into the whole gwt component creation stuf, any good pointers for that? The mentioned AutoComplete project in SVN seems quite bitrotten and doesn’t compile on Vaadin 6.6+