On Monday, April 18, 2011 12:01:10 PM UTC+2, Jonas wrote:
>
> My question is when I have a TextBox for example and want
> to use both addKeyDownHandler, addValueChangeHandler and also read the
> text from it, should I have 3 methods in my view that returns
> something like
>
> public HasValue<String> getEmailValue() { return emailBox };
> public HasKeyDownHandlers getEmailDown() { return emailBox };
> public HasValueChangeHandlers<String> getEmailChange() { return
> emailBox; }
>
I'm not 100% sure if my suggestion works, but I would create my own
Interface:
public interface HasStringValueHandlers extends HasValue<String>,
HasKeyDownHandlers, HasValueChangeHandlers<String> {
}
Then you can do this in the view:
HasStringValueHandlers getEmail() {
return (HasStringValueHandlers) stringTextBox;
}
H
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.