Hi, Still have the same problem and duplicated code.
Following the bug. Regards, On Wed, Mar 24, 2010 at 5:07 PM, Diego Alvarez Araujo Correia < [email protected]> wrote: > I'm facing the same problem and have opened a bug for it: > > > http://code.google.com/p/google-web-toolkit/issues/detail?id=4785&q=ValueChangeEvent > > Thanks Youen > > > On Dec 30 2009, 2:50 pm, Youen <[email protected]> wrote: > > Hi, > > > > I've just detecting aproblemwith thedateboxwidget with GWT 2.0, > > the widget works well but when I set aformatto > thedateboxtwovaluechangeeventsare handled by thedatebox. > > > > Does anyone 's got a solution or know that is a bug already known by > > the GWT team ? > > > > (Except the solution that need to write more code in using > > db.getDatePicker().addValueChangeHandler + db.getTextBox > > ().addValueChangeHandler) > > > > Regards, > > > > A small piece of code to see the behaviour : > > > > public static > finalFormatdateboxFormat=newDateBox.DefaultFormat > > (DateTimeFormat.getFormat("dd/MM/yyyy")); > > > > [...] > > > > DateBoxdb=newDateBox(); > > db.setFormat(dateboxFormat); > > fp.add(db); > > > > // After selecting a date on the datepicker popup > > db.getDatePicker().addValueChangeHandler(new > > ValueChangeHandler<Date>() { > > > > @Override > > public void > onValueChange(ValueChangeEvent<Date> event) { > > Window.alert("datepicker"); > > > > } > > }); > > // After editing manually the date in the textbox > > db.getTextBox().addValueChangeHandler(new > ValueChangeHandler<String> > > () { > > > > @Override > > public void > onValueChange(ValueChangeEvent<String> event) { > > Window.alert("text"); > > > > } > > }); > > // After selecting a date on the datepicker popup > OR editing > > manually the date in the textbox > > // Twoeventsare triggered for one datechangewhen > a setFormat > > (...) is set to adatebox. > > db.addValueChangeHandler(new > ValueChangeHandler<Date>() { > > > > @Override > > public void > onValueChange(ValueChangeEvent<Date> event) { > > Window.alert("datebox"); //Got it > twice for one date editing > > > > } > > }); > -- 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.
