DateCell and EditTextCell store user entered data in a view data object, so the pending user entered value can be rendered even if the table is refreshed. To clear it, do the following: myDateCell.clearViewData(keyOfAppointment);
If you specified a key provider to CellTable, the key is the key provided by it. If you do not use a key provider, the key is the Appointment itself. Thanks, John LaBanca [email protected] On Sat, Dec 4, 2010 at 4:37 PM, bradr <[email protected]> wrote: > I am using the CellTable, with the EditTextCell and the > DatePickerCell. > > I'm trying to do some basic validation to control the users input. For > example > 1) I'd like to prevent the user from inputting a null or empty string > in the EditTextCell > 2) I have a Start and End date. And I want to make sure the user > doesn't set the End date before the Start date > > finishColumn.setFieldUpdater(new FieldUpdater<Appointment, > Date>() { > public void update(int index, Appointment object, > Date value) { > > if(object.getFinish().before(getStart()) { > Window.alert("The Appointment can > not finish before the Start date"); > } else { > object.setFinish(value); > } > } > }); > > I'm able to prevent the incorrect finish date from being set, however, > the grid still displays the incorrect value. The object and grid are, > therefore, out of sync. > > What is the recommended way to data validation within in editable > CellTable? > > -- > 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.
