bradr
unread,Dec 4, 2010, 4:37:45 PM12/4/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
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?