Problem with JdbTable and ColumnChangeListener


2004-04-20 12:41:04 AM
jbuilder7
Hi folks,
I have some DataSet with several columns and I want to show data in JdbTable
and have some kind of field level validation, let say on column2. What I
do:
mydataSet.addColumnChangeListener(new com.borland.dx.dataset.
ColumnChangeAdapter() {
public void validate(DataSet dataSet, Column column, Variant value)
throws
Exception, DataSetException {
if (column == column2 && value.getAsObject().equals("my")) {
throw new
ValidationException(ValidationException.APPLICATION_ERROR,
"Column level validation: value of column2 cannot be equls
to my",
column);
}
}
});
When I put "my" value in column2 in JdbTable and try to leave the column, my
status bar shows me the error message but JdbTable doesn't return focus to
column2. It's for sure some kind of bug. I've tried to use JdbTextField for
the same dataset with same column validation everything works perfect, I see
message in StatusBar and focus stay in JdbTextField.
What's wrong and more important how to fix it?
Vadim Koustov
Senior Software Architect
Blinco Systems Inc.
.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.656 / Virus Database: 421 - Release Date: 4/9/2004