Yes, your custom onValueChange() code will be called when the value of the textbox changes. Do with it what you will...
If that doesn't quite work for your purposes, there is a handler for most UI events like addDoubleClickHandler( new DoubleClickHandler().... onDoubleClick()... ) They are listed at http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/event/shared/EventHandler.html On Tue, Oct 19, 2010 at 1:29 PM, Diego Venuzka <[email protected]> wrote: > hmm, i understand that part, but how i put the values? inside the > OnValueChange? > Regards! :D > > 2010/10/19 A. Stevko <[email protected]> > >> Every control has a number of xxxHandlers interfaces that you can hang >> code off of. >> Try something like this using old style (pre-binder) code >> >> // create a text box & add it to a Panel >> myTextBox = new TextBox(); >> // add a handler to the text box control >> myTextBox.addValueChangeHandler( new ValueChangeHandler<String>() { >> >> @Override >> public void onValueChange(ValueChangeEvent<String> event) { >> Boolean isChar = (null == Integer.getInteger( myTextBox.getValue() )); >> } >> }); >> >> >> >> On Tue, Oct 19, 2010 at 12:40 PM, Diego Venuzka <[email protected]>wrote: >> >>> but how i do this ? >>> >>> 2010/10/17, A. Stevko <[email protected]>: >>> > Which UI control and API are you referring to? >>> > I cannot seem to find a setValidator() method in the >>> > *com.google.gwt.user.client.ui.TextBox >>> > *class heirarchy. >>> > >>> > You might want to use the >>> > Interface HasValueChangeHandlers<I> >>> > to add a handler that will be able to parse it via Integer.getInteger( >>> > myControl.getValue() ) >>> > >>> > >>> > On Sat, Oct 16, 2010 at 4:45 AM, Diego Venuzka <[email protected]> >>> wrote: >>> > >>> >> Anyone? >>> >> >>> >> 2010/10/14, Diego Venuzka <[email protected]>: >>> >> > Hello! >>> >> > Somebody know how i can make a test in field, to know if the data is >>> >> string >>> >> > or integer? i'm tryng to use the setValidator(), but i don't know >>> how i >>> >> set >>> >> > the parameters.... someone can help this rookie? =P >>> >> > >>> >> > Thanks!! >>> >> > >>> >> > -- >>> >> > Diego Venuzka >>> >> > >>> >> >>> >> >>> >> -- >>> >> Diego Venuzka >>> >> >>> >> -- >>> >> 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]<google-web-toolkit%[email protected]> >>> <google-web-toolkit%[email protected]<google-web-toolkit%[email protected]> >>> > >>> >> . >>> >> For more options, visit this group at >>> >> http://groups.google.com/group/google-web-toolkit?hl=en. >>> >> >>> >> >>> > >>> > -- >>> > 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]<google-web-toolkit%[email protected]> >>> . >>> > For more options, visit this group at >>> > http://groups.google.com/group/google-web-toolkit?hl=en. >>> > >>> > >>> >>> >>> -- >>> Diego Venuzka >>> >>> -- >>> 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]<google-web-toolkit%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/google-web-toolkit?hl=en. >>> >>> >> -- >> 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]<google-web-toolkit%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> > > > > -- > Diego Venuzka > > -- > 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]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- 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.
