Reputation: 16941
How to tell if TextArea is selected or not. I want to save automatically when user changes the focus from TextArea.
I tried to look into addFocusHandler() and addBlurHandler() but couldn't figure out how to tell if it is selected or not.
Upvotes: 1
Views: 1072
Reputation: 31652
I'd create a custom class that extends textarea and implement your call to save the data right there. Then use your custom class instead of the base class on the form you are building.
An example of a focuslistener: http://dev.vaadin.com/browser/versions/6.1/src/com/vaadin/terminal/gwt/client/ui/VTextField.java?rev=8544
Upvotes: 1