public static TextBox wrap ( final Element element ) { // Assert that the element is attached. assert Document . get ( ) . getBody ( ) . isOrHasChild ( element ) ; final TextBox textBox = new TextBox ( element ) ; // Mark it attached and remember it for cleanup. textBox . onAttach ( ) ; RootPanel . detachOnWindowClose ( textBox ) ; return textBox ; }
Creates a TextBox widget that wraps an existing &lt ; input type = text &gt ; element .