Same problem. On 24 mar, 12:38, Diego Alvarez Araujo Correia <dal...@gmail.com> wrote: > Hi Youen, > I'm facing the sameproblemhere. > > After I set theformatof adatebox(and I do it only once) > everytime Ichangethevalueof the widget it throws two > ValueChangeEvent. > It seems like a bug to me. > > Anybody else with thisproblem? > > I'm going to open an issue on the bug track and will post > here the link. > > Thanks Youen, > Diego Alvarez > > On Dec 30 2009, 2:50 pm, Youen <youen.ch...@gmail.com> 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 google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.